From 8571851004298d365c701e39da8ca8a6b99bf62e Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 30 Jun 2023 15:48:02 +0300 Subject: [PATCH 1/5] Remove `SQLAlchemy stubs --- pyrightconfig.stricter.json | 1 - .../SQLAlchemy/@tests/stubtest_allowlist.txt | 85 --- .../@tests/test_cases/check_loader_option.py | 60 --- .../@tests/test_cases/check_register.py | 68 --- stubs/SQLAlchemy/METADATA.toml | 9 - stubs/SQLAlchemy/sqlalchemy/__init__.pyi | 133 ----- .../SQLAlchemy/sqlalchemy/cimmutabledict.pyi | 19 - .../sqlalchemy/connectors/__init__.pyi | 1 - .../sqlalchemy/connectors/mxodbc.pyi | 17 - .../sqlalchemy/connectors/pyodbc.pyi | 22 - stubs/SQLAlchemy/sqlalchemy/cprocessors.pyi | 15 - stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi | 23 - .../sqlalchemy/databases/__init__.pyi | 18 - .../sqlalchemy/dialects/__init__.pyi | 16 - .../sqlalchemy/dialects/firebird/__init__.pyi | 34 -- .../sqlalchemy/dialects/firebird/base.pyi | 108 ---- .../sqlalchemy/dialects/firebird/fdb.pyi | 10 - .../dialects/firebird/kinterbasdb.pyi | 39 -- .../sqlalchemy/dialects/mssql/__init__.pyi | 76 --- .../sqlalchemy/dialects/mssql/base.pyi | 323 ------------ .../dialects/mssql/information_schema.pyi | 35 -- .../sqlalchemy/dialects/mssql/json.pyi | 10 - .../sqlalchemy/dialects/mssql/mxodbc.pyi | 27 - .../sqlalchemy/dialects/mssql/provision.pyi | 0 .../sqlalchemy/dialects/mssql/pymssql.pyi | 24 - .../sqlalchemy/dialects/mssql/pyodbc.pyi | 45 -- .../sqlalchemy/dialects/mysql/__init__.pyi | 85 --- .../sqlalchemy/dialects/mysql/aiomysql.pyi | 74 --- .../sqlalchemy/dialects/mysql/asyncmy.pyi | 84 --- .../sqlalchemy/dialects/mysql/base.pyi | 241 --------- .../sqlalchemy/dialects/mysql/cymysql.pyi | 21 - .../sqlalchemy/dialects/mysql/dml.pyi | 23 - .../sqlalchemy/dialects/mysql/enumerated.pyi | 21 - .../sqlalchemy/dialects/mysql/expression.pyi | 13 - .../sqlalchemy/dialects/mysql/json.pyi | 10 - .../sqlalchemy/dialects/mysql/mariadb.pyi | 11 - .../dialects/mysql/mariadbconnector.pyi | 36 -- .../dialects/mysql/mysqlconnector.pyi | 38 -- .../sqlalchemy/dialects/mysql/mysqldb.pyi | 33 -- .../sqlalchemy/dialects/mysql/oursql.pyi | 40 -- .../sqlalchemy/dialects/mysql/provision.pyi | 0 .../sqlalchemy/dialects/mysql/pymysql.pyi | 20 - .../sqlalchemy/dialects/mysql/pyodbc.pyi | 20 - .../sqlalchemy/dialects/mysql/reflection.pyi | 16 - .../dialects/mysql/reserved_words.pyi | 4 - .../sqlalchemy/dialects/mysql/types.pyi | 158 ------ .../sqlalchemy/dialects/oracle/__init__.pyi | 52 -- .../sqlalchemy/dialects/oracle/base.pyi | 222 -------- .../sqlalchemy/dialects/oracle/cx_oracle.pyi | 127 ----- .../sqlalchemy/dialects/oracle/provision.pyi | 0 .../dialects/postgresql/__init__.pyi | 100 ---- .../sqlalchemy/dialects/postgresql/array.pyi | 41 -- .../dialects/postgresql/asyncpg.pyi | 206 -------- .../sqlalchemy/dialects/postgresql/base.pyi | 314 ----------- .../sqlalchemy/dialects/postgresql/dml.pyi | 56 -- .../sqlalchemy/dialects/postgresql/ext.pyi | 27 - .../sqlalchemy/dialects/postgresql/hstore.pyi | 67 --- .../sqlalchemy/dialects/postgresql/json.pyi | 28 - .../sqlalchemy/dialects/postgresql/pg8000.pyi | 134 ----- .../dialects/postgresql/provision.pyi | 0 .../dialects/postgresql/psycopg2.pyi | 95 ---- .../dialects/postgresql/psycopg2cffi.pyi | 13 - .../dialects/postgresql/pygresql.pyi | 52 -- .../dialects/postgresql/pypostgresql.pyi | 30 -- .../sqlalchemy/dialects/postgresql/ranges.pyi | 36 -- .../sqlalchemy/dialects/sqlite/__init__.pyi | 45 -- .../sqlalchemy/dialects/sqlite/aiosqlite.pyi | 73 --- .../sqlalchemy/dialects/sqlite/base.pyi | 141 ----- .../sqlalchemy/dialects/sqlite/dml.pyi | 44 -- .../sqlalchemy/dialects/sqlite/json.pyi | 10 - .../sqlalchemy/dialects/sqlite/provision.pyi | 0 .../dialects/sqlite/pysqlcipher.pyi | 16 - .../sqlalchemy/dialects/sqlite/pysqlite.pyi | 28 - .../sqlalchemy/dialects/sybase/__init__.pyi | 58 --- .../sqlalchemy/dialects/sybase/base.pyi | 135 ----- .../sqlalchemy/dialects/sybase/mxodbc.pyi | 9 - .../sqlalchemy/dialects/sybase/pyodbc.pyi | 19 - .../sqlalchemy/dialects/sybase/pysybase.pyi | 28 - .../SQLAlchemy/sqlalchemy/engine/__init__.pyi | 46 -- stubs/SQLAlchemy/sqlalchemy/engine/base.pyi | 215 -------- .../sqlalchemy/engine/characteristics.pyi | 16 - stubs/SQLAlchemy/sqlalchemy/engine/create.pyi | 22 - stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi | 133 ----- .../SQLAlchemy/sqlalchemy/engine/default.pyi | 222 -------- stubs/SQLAlchemy/sqlalchemy/engine/events.pyi | 29 -- .../sqlalchemy/engine/interfaces.pyi | 170 ------ stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi | 32 -- .../sqlalchemy/engine/reflection.pyi | 32 -- stubs/SQLAlchemy/sqlalchemy/engine/result.pyi | 134 ----- stubs/SQLAlchemy/sqlalchemy/engine/row.pyi | 63 --- .../sqlalchemy/engine/strategies.pyi | 4 - stubs/SQLAlchemy/sqlalchemy/engine/url.pyi | 65 --- stubs/SQLAlchemy/sqlalchemy/engine/util.pyi | 12 - .../SQLAlchemy/sqlalchemy/event/__init__.pyi | 10 - stubs/SQLAlchemy/sqlalchemy/event/api.pyi | 9 - stubs/SQLAlchemy/sqlalchemy/event/attr.pyi | 85 --- stubs/SQLAlchemy/sqlalchemy/event/base.pyi | 31 -- stubs/SQLAlchemy/sqlalchemy/event/legacy.pyi | 0 .../SQLAlchemy/sqlalchemy/event/registry.pyi | 27 - stubs/SQLAlchemy/sqlalchemy/events.pyi | 4 - stubs/SQLAlchemy/sqlalchemy/exc.pyi | 147 ------ stubs/SQLAlchemy/sqlalchemy/ext/__init__.pyi | 0 .../sqlalchemy/ext/associationproxy.pyi | 200 ------- .../sqlalchemy/ext/asyncio/__init__.pyi | 15 - .../sqlalchemy/ext/asyncio/base.pyi | 19 - .../sqlalchemy/ext/asyncio/engine.pyi | 103 ---- .../sqlalchemy/ext/asyncio/events.pyi | 5 - .../SQLAlchemy/sqlalchemy/ext/asyncio/exc.pyi | 5 - .../sqlalchemy/ext/asyncio/result.pyi | 56 -- .../sqlalchemy/ext/asyncio/scoping.pyi | 80 --- .../sqlalchemy/ext/asyncio/session.pyi | 120 ----- stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi | 27 - stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi | 49 -- stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi | 8 - .../sqlalchemy/ext/declarative/__init__.pyi | 27 - .../sqlalchemy/ext/declarative/extensions.pyi | 14 - .../sqlalchemy/ext/horizontal_shard.pyi | 34 -- stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi | 68 --- stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi | 18 - .../sqlalchemy/ext/instrumentation.pyi | 55 -- stubs/SQLAlchemy/sqlalchemy/ext/mutable.pyi | 64 --- .../sqlalchemy/ext/orderinglist.pyi | 22 - .../SQLAlchemy/sqlalchemy/ext/serializer.pyi | 10 - .../SQLAlchemy/sqlalchemy/future/__init__.pyi | 5 - stubs/SQLAlchemy/sqlalchemy/future/engine.pyi | 38 -- .../sqlalchemy/future/orm/__init__.pyi | 0 stubs/SQLAlchemy/sqlalchemy/inspection.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/log.pyi | 51 -- stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi | 126 ----- .../SQLAlchemy/sqlalchemy/orm/attributes.pyi | 286 ---------- stubs/SQLAlchemy/sqlalchemy/orm/base.pyi | 76 --- .../SQLAlchemy/sqlalchemy/orm/clsregistry.pyi | 52 -- .../SQLAlchemy/sqlalchemy/orm/collections.pyi | 130 ----- stubs/SQLAlchemy/sqlalchemy/orm/context.pyi | 213 -------- stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi | 146 ------ stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi | 47 -- .../SQLAlchemy/sqlalchemy/orm/dependency.pyi | 74 --- .../sqlalchemy/orm/descriptor_props.pyi | 74 --- stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi | 85 --- stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi | 25 - stubs/SQLAlchemy/sqlalchemy/orm/events.pyi | 104 ---- stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi | 35 -- stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi | 31 -- .../sqlalchemy/orm/instrumentation.pyi | 92 ---- .../SQLAlchemy/sqlalchemy/orm/interfaces.pyi | 133 ----- stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi | 47 -- stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi | 145 ------ .../sqlalchemy/orm/path_registry.pyi | 107 ---- .../SQLAlchemy/sqlalchemy/orm/persistence.pyi | 40 -- .../SQLAlchemy/sqlalchemy/orm/properties.pyi | 45 -- stubs/SQLAlchemy/sqlalchemy/orm/query.pyi | 143 ----- .../sqlalchemy/orm/relationships.pyi | 187 ------- stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi | 105 ---- stubs/SQLAlchemy/sqlalchemy/orm/session.pyi | 232 --------- stubs/SQLAlchemy/sqlalchemy/orm/state.pyi | 82 --- .../SQLAlchemy/sqlalchemy/orm/strategies.pyi | 142 ----- .../sqlalchemy/orm/strategy_options.pyi | 86 ---- stubs/SQLAlchemy/sqlalchemy/orm/sync.pyi | 6 - .../SQLAlchemy/sqlalchemy/orm/unitofwork.pyi | 109 ---- stubs/SQLAlchemy/sqlalchemy/orm/util.pyi | 200 ------- stubs/SQLAlchemy/sqlalchemy/pool/__init__.pyi | 27 - stubs/SQLAlchemy/sqlalchemy/pool/base.pyi | 94 ---- .../sqlalchemy/pool/dbapi_proxy.pyi | 19 - stubs/SQLAlchemy/sqlalchemy/pool/events.pyi | 13 - stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi | 46 -- stubs/SQLAlchemy/sqlalchemy/processors.pyi | 7 - stubs/SQLAlchemy/sqlalchemy/schema.pyi | 51 -- stubs/SQLAlchemy/sqlalchemy/sql/__init__.pyi | 91 ---- .../SQLAlchemy/sqlalchemy/sql/annotation.pyi | 206 -------- stubs/SQLAlchemy/sqlalchemy/sql/base.pyi | 162 ------ stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi | 74 --- stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi | 487 ------------------ stubs/SQLAlchemy/sqlalchemy/sql/crud.pyi | 18 - stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi | 155 ------ .../sqlalchemy/sql/default_comparator.pyi | 3 - stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi | 120 ----- stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi | 473 ----------------- stubs/SQLAlchemy/sqlalchemy/sql/events.pyi | 10 - .../SQLAlchemy/sqlalchemy/sql/expression.pyi | 203 -------- stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi | 228 -------- stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi | 122 ----- stubs/SQLAlchemy/sqlalchemy/sql/naming.pyi | 10 - stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi | 194 ------- stubs/SQLAlchemy/sqlalchemy/sql/roles.pyi | 57 -- stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi | 378 -------------- .../SQLAlchemy/sqlalchemy/sql/selectable.pyi | 438 ---------------- stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi | 381 -------------- .../SQLAlchemy/sqlalchemy/sql/traversals.pyi | 157 ------ stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi | 118 ----- stubs/SQLAlchemy/sqlalchemy/sql/util.pyi | 104 ---- stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi | 86 ---- .../sqlalchemy/testing/__init__.pyi | 77 --- .../sqlalchemy/testing/assertions.pyi | 89 ---- .../sqlalchemy/testing/assertsql.pyi | 82 --- .../SQLAlchemy/sqlalchemy/testing/asyncio.pyi | 1 - .../SQLAlchemy/sqlalchemy/testing/config.pyi | 58 --- .../SQLAlchemy/sqlalchemy/testing/engines.pyi | 83 --- .../sqlalchemy/testing/entities.pyi | 9 - .../sqlalchemy/testing/exclusions.pyi | 80 --- .../sqlalchemy/testing/fixtures.pyi | 84 --- stubs/SQLAlchemy/sqlalchemy/testing/mock.pyi | 1 - .../sqlalchemy/testing/pickleable.pyi | 63 --- .../sqlalchemy/testing/plugin/__init__.pyi | 0 .../sqlalchemy/testing/plugin/bootstrap.pyi | 6 - .../sqlalchemy/testing/plugin/plugin_base.pyi | 62 --- .../testing/plugin/pytestplugin.pyi | 38 -- .../testing/plugin/reinvent_fixtures_py2k.pyi | 6 - .../sqlalchemy/testing/profiling.pyi | 21 - .../sqlalchemy/testing/provision.pyi | 62 --- .../sqlalchemy/testing/requirements.pyi | 399 -------------- .../SQLAlchemy/sqlalchemy/testing/schema.pyi | 16 - stubs/SQLAlchemy/sqlalchemy/testing/util.pyi | 41 -- .../sqlalchemy/testing/warnings.pyi | 7 - stubs/SQLAlchemy/sqlalchemy/types.pyi | 106 ---- stubs/SQLAlchemy/sqlalchemy/util/__init__.pyi | 173 ------- .../sqlalchemy/util/_collections.pyi | 219 -------- .../sqlalchemy/util/_compat_py3k.pyi | 13 - .../sqlalchemy/util/_concurrency_py3k.pyi | 19 - .../SQLAlchemy/sqlalchemy/util/_preloaded.pyi | 11 - stubs/SQLAlchemy/sqlalchemy/util/compat.pyi | 112 ---- .../sqlalchemy/util/concurrency.pyi | 13 - .../sqlalchemy/util/deprecations.pyi | 28 - .../sqlalchemy/util/langhelpers.pyi | 176 ------- stubs/SQLAlchemy/sqlalchemy/util/queue.pyi | 35 -- .../sqlalchemy/util/topological.pyi | 3 - tests/pytype_exclude_list.txt | 2 - 226 files changed, 17106 deletions(-) delete mode 100644 stubs/SQLAlchemy/@tests/stubtest_allowlist.txt delete mode 100644 stubs/SQLAlchemy/@tests/test_cases/check_loader_option.py delete mode 100644 stubs/SQLAlchemy/@tests/test_cases/check_register.py delete mode 100644 stubs/SQLAlchemy/METADATA.toml delete mode 100644 stubs/SQLAlchemy/sqlalchemy/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/connectors/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/cprocessors.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/databases/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/firebird/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/information_schema.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/json.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/provision.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pymssql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/cymysql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/dml.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/enumerated.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/expression.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/json.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadb.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqlconnector.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/provision.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pyodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reserved_words.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/oracle/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/oracle/provision.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/provision.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pygresql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pypostgresql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ranges.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/json.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/provision.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlcipher.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlite.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sybase/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sybase/mxodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/characteristics.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/create.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/default.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/events.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/result.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/row.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/strategies.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/url.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/engine/util.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/event/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/event/api.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/event/attr.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/event/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/event/legacy.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/event/registry.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/events.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/exc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/events.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/exc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/declarative/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/declarative/extensions.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/mutable.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/future/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/future/engine.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/future/orm/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/inspection.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/log.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/context.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/dependency.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/events.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/properties.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/query.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/session.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/state.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/sync.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/orm/util.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/pool/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/pool/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/pool/events.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/processors.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/schema.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/annotation.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/crud.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/default_comparator.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/events.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/expression.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/naming.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/roles.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/util.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/asyncio.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/config.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/entities.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/fixtures.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/mock.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/pickleable.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/plugin/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/plugin/bootstrap.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/plugin/plugin_base.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/plugin/pytestplugin.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/plugin/reinvent_fixtures_py2k.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/requirements.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/schema.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/util.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/types.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/__init__.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/_compat_py3k.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/compat.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/concurrency.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/queue.pyi delete mode 100644 stubs/SQLAlchemy/sqlalchemy/util/topological.pyi diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 110f559bec4a..6d477cf6dd33 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -69,7 +69,6 @@ "stubs/redis", "stubs/requests", "stubs/setuptools", - "stubs/SQLAlchemy", "stubs/stripe", "stubs/tqdm", "stubs/ttkthemes", diff --git a/stubs/SQLAlchemy/@tests/stubtest_allowlist.txt b/stubs/SQLAlchemy/@tests/stubtest_allowlist.txt deleted file mode 100644 index aacd3b85a56e..000000000000 --- a/stubs/SQLAlchemy/@tests/stubtest_allowlist.txt +++ /dev/null @@ -1,85 +0,0 @@ -# mypy plugin not supported in typeshed -sqlalchemy.ext.mypy.* -# test suites -sqlalchemy.testing.suite -# Leaked re-exports from the compat module -sqlalchemy.util.quote - -# Expanding keyword arguments in stubs -sqlalchemy.ext.declarative.as_declarative - -# not always present -sqlalchemy.engine.Engine.logging_name # initialized if not None -sqlalchemy.engine.base.Engine.logging_name # initialized if not None -sqlalchemy.sql.lambdas.PyWrapper.__clause_element__ -sqlalchemy.testing.util.non_refcount_gc_collect - -# potentially replaced at runtime -sqlalchemy.engine.Row.count -sqlalchemy.engine.Row.index -sqlalchemy.engine.row.Row.count -sqlalchemy.engine.row.Row.index - -# abstract fields not present at runtime -sqlalchemy.engine.Transaction.connection -sqlalchemy.engine.Transaction.is_active -sqlalchemy.engine.base.Transaction.connection -sqlalchemy.engine.base.Transaction.is_active - -# initialized to None during class construction, but overridden during __init__() or __new__() -sqlalchemy.engine.base.Connection.engine -sqlalchemy.engine.Connection.engine -sqlalchemy.orm.Mapper.single -sqlalchemy.orm.mapper.Mapper.single - -# Uses @memoized_property at runtime, but we use @property for compatibility -sqlalchemy.engine.URL.normalized_query -sqlalchemy.engine.url.URL.normalized_query -# Uses @memoized_property, but that causes regr_test to raise 'Cannot determine type of "..." in base class "..." [misc]' -sqlalchemy.schema.SchemaItem.info -sqlalchemy.sql.elements.AnnotatedColumnElement.info -sqlalchemy.sql.elements.AnnotatedColumnElement.key -sqlalchemy.sql.elements.AnnotatedColumnElement.name -sqlalchemy.sql.elements.AnnotatedColumnElement.table -sqlalchemy.sql.schema.SchemaItem.info - -# runtime has extra internal arguments that are inconsistent across micro versions -sqlalchemy.testing.engines.testing_engine - -# __new__ signature conflicts with __init__ signature (which is more precise), -# so __new__ is deliberately omitted in the stub -sqlalchemy.sql.annotation.Annotated.__new__ - -# At runtime __new__ is defined, but we define __init__ in the stub -# because otherwise all subclasses would be identified by pyright -# as having conflicting __new__/__init__ methods -sqlalchemy.orm.unitofwork.PostSortRec.__new__ - -# KeyError/AttributeError on import due to dynamic initialization from a different module -sqlalchemy.testing.fixtures -sqlalchemy.testing.pickleable -sqlalchemy.testing.plugin.bootstrap - -# method arguments starting with double underscores in the implementation trips up stubtest -sqlalchemy.testing.resolve_lambda -sqlalchemy.testing.util.resolve_lambda -sqlalchemy.orm.collections.MappedCollection.update - -# stubtest thinks __slots__ are always members -# https://github.com/python/mypy/issues/13906 -sqlalchemy.sql.elements.quoted_name.lower -sqlalchemy.sql.elements.quoted_name.upper -sqlalchemy.sql.expression.quoted_name.lower -sqlalchemy.sql.expression.quoted_name.upper -sqlalchemy.sql.quoted_name.lower -sqlalchemy.sql.quoted_name.upper -sqlalchemy.orm.ColumnProperty.Comparator.__clause_element__ -sqlalchemy.orm.properties.ColumnProperty.Comparator.__clause_element__ - -# Same error as in stdlib due to it being re-exported -sqlalchemy.dialects.mysql.asyncmy.AsyncAdapt_asyncmy_dbapi.Binary -sqlalchemy.util.compat.StringIO.seek -sqlalchemy.util.compat.StringIO.truncate -sqlalchemy.util.StringIO.seek -sqlalchemy.util.StringIO.truncate -sqlalchemy.testing.mock.patch diff --git a/stubs/SQLAlchemy/@tests/test_cases/check_loader_option.py b/stubs/SQLAlchemy/@tests/test_cases/check_loader_option.py deleted file mode 100644 index 1f596af83356..000000000000 --- a/stubs/SQLAlchemy/@tests/test_cases/check_loader_option.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import annotations - -from typing_extensions import assert_type - -from sqlalchemy.orm.strategy_options import ( - Load, - contains_eager, - defaultload, - defer, - immediateload, - joinedload, - lazyload, - load_only, - loader_option, - noload, - raiseload, - selectin_polymorphic, - selectinload, - subqueryload, - undefer, - undefer_group, - with_expression, -) - - -def fn(loadopt: Load, *args: object) -> loader_option: - return loader_option() - - -# Testing that the function and return type of function are actually all instances of "loader_option" -assert_type(contains_eager, loader_option) -assert_type(contains_eager(fn), loader_option) -assert_type(load_only, loader_option) -assert_type(load_only(fn), loader_option) -assert_type(joinedload, loader_option) -assert_type(joinedload(fn), loader_option) -assert_type(subqueryload, loader_option) -assert_type(subqueryload(fn), loader_option) -assert_type(selectinload, loader_option) -assert_type(selectinload(fn), loader_option) -assert_type(lazyload, loader_option) -assert_type(lazyload(fn), loader_option) -assert_type(immediateload, loader_option) -assert_type(immediateload(fn), loader_option) -assert_type(noload, loader_option) -assert_type(noload(fn), loader_option) -assert_type(raiseload, loader_option) -assert_type(raiseload(fn), loader_option) -assert_type(defaultload, loader_option) -assert_type(defaultload(fn), loader_option) -assert_type(defer, loader_option) -assert_type(defer(fn), loader_option) -assert_type(undefer, loader_option) -assert_type(undefer(fn), loader_option) -assert_type(undefer_group, loader_option) -assert_type(undefer_group(fn), loader_option) -assert_type(with_expression, loader_option) -assert_type(with_expression(fn), loader_option) -assert_type(selectin_polymorphic, loader_option) -assert_type(selectin_polymorphic(fn), loader_option) diff --git a/stubs/SQLAlchemy/@tests/test_cases/check_register.py b/stubs/SQLAlchemy/@tests/test_cases/check_register.py deleted file mode 100644 index 186cb2540334..000000000000 --- a/stubs/SQLAlchemy/@tests/test_cases/check_register.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import annotations - -from _typeshed.dbapi import DBAPIConnection -from typing import cast - -from sqlalchemy.engine.base import Engine -from sqlalchemy.engine.default import DefaultDialect -from sqlalchemy.engine.url import URL -from sqlalchemy.pool.base import Pool -from sqlalchemy.testing import config as ConfigModule -from sqlalchemy.testing.provision import ( - configure_follower, - create_db, - drop_all_schema_objects_post_tables, - drop_all_schema_objects_pre_tables, - drop_db, - follower_url_from_main, - generate_driver_url, - get_temp_table_name, - post_configure_engine, - prepare_for_drop_tables, - register, - run_reap_dbs, - set_default_schema_on_connection, - stop_test_class_outside_fixtures, - temp_table_keyword_args, - update_db_opts, -) -from sqlalchemy.util import immutabledict - -url = URL("", "", "", "", 0, "", immutabledict()) -engine = Engine(Pool(lambda: cast(DBAPIConnection, object())), DefaultDialect(), "") -config = cast(ConfigModule.Config, object()) -unused = None - - -class Foo: - pass - - -# Test that the decorator changes the first parameter to "cfg: str | URL | _ConfigProtocol" -@register.init -def no_args(__foo: Foo) -> None: - pass - - -no_args(cfg="") -no_args(cfg=url) -no_args(cfg=config) - -# Test pre-decorated functions -generate_driver_url(url, "", "") -drop_all_schema_objects_pre_tables(url, unused) -drop_all_schema_objects_post_tables(url, unused) -create_db(url, engine, unused) -drop_db(url, engine, unused) -update_db_opts(url, unused) -post_configure_engine(url, unused, unused) -follower_url_from_main(url, "") -configure_follower(url, unused) -run_reap_dbs(url, unused) -temp_table_keyword_args(url, engine) -prepare_for_drop_tables(url, unused) -stop_test_class_outside_fixtures(url, unused, type) -get_temp_table_name(url, unused, "") -set_default_schema_on_connection(url, unused, unused) -set_default_schema_on_connection(ConfigModule, unused, unused) -set_default_schema_on_connection(config, unused, unused) diff --git a/stubs/SQLAlchemy/METADATA.toml b/stubs/SQLAlchemy/METADATA.toml deleted file mode 100644 index f3db0ed39366..000000000000 --- a/stubs/SQLAlchemy/METADATA.toml +++ /dev/null @@ -1,9 +0,0 @@ -version = "1.4.46" -extra_description = """\ - The `sqlalchemy-stubs` package is an alternative to this package and also \ - includes a mypy plugin for more precise types.\ -""" -obsolete_since = "2.0.0" # Released on 2023-01-26 - -[tool.stubtest] -stubtest_requirements = ["pytest"] diff --git a/stubs/SQLAlchemy/sqlalchemy/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/__init__.pyi deleted file mode 100644 index 85d101e51219..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/__init__.pyi +++ /dev/null @@ -1,133 +0,0 @@ -from .engine import ( - create_engine as create_engine, - create_mock_engine as create_mock_engine, - engine_from_config as engine_from_config, -) -from .inspection import inspect as inspect -from .schema import ( - BLANK_SCHEMA as BLANK_SCHEMA, - DDL as DDL, - CheckConstraint as CheckConstraint, - Column as Column, - ColumnDefault as ColumnDefault, - Computed as Computed, - Constraint as Constraint, - DefaultClause as DefaultClause, - FetchedValue as FetchedValue, - ForeignKey as ForeignKey, - ForeignKeyConstraint as ForeignKeyConstraint, - Identity as Identity, - Index as Index, - MetaData as MetaData, - PrimaryKeyConstraint as PrimaryKeyConstraint, - Sequence as Sequence, - Table as Table, - ThreadLocalMetaData as ThreadLocalMetaData, - UniqueConstraint as UniqueConstraint, -) -from .sql import ( - LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT, - LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY, - LABEL_STYLE_NONE as LABEL_STYLE_NONE, - LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL, - 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, - lambda_stmt as lambda_stmt, - lateral as lateral, - literal as literal, - literal_column as literal_column, - modifier as modifier, - not_ as not_, - null as null, - nulls_first as nulls_first, - nulls_last as nulls_last, - nullsfirst as nullsfirst, - nullslast as nullslast, - 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, - values as values, - within_group as within_group, -) -from .sql.sqltypes import ( - ARRAY as ARRAY, - BIGINT as BIGINT, - BINARY as BINARY, - BLOB as BLOB, - BOOLEAN as BOOLEAN, - CHAR as CHAR, - CLOB as CLOB, - DATE as DATE, - DATETIME as DATETIME, - DECIMAL as DECIMAL, - FLOAT as FLOAT, - INT as INT, - INTEGER as INTEGER, - JSON as JSON, - NCHAR as NCHAR, - NUMERIC as NUMERIC, - NVARCHAR as NVARCHAR, - REAL as REAL, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - VARBINARY as VARBINARY, - VARCHAR as VARCHAR, - BigInteger as BigInteger, - Boolean as Boolean, - Date as Date, - DateTime as DateTime, - Enum as Enum, - Float as Float, - Integer as Integer, - Interval as Interval, - LargeBinary as LargeBinary, - Numeric as Numeric, - PickleType as PickleType, - SmallInteger as SmallInteger, - String as String, - Text as Text, - Time as Time, - TupleType as TupleType, - TypeDecorator as TypeDecorator, - Unicode as Unicode, - UnicodeText as UnicodeText, -) - -__version__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi b/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi deleted file mode 100644 index 1a1a3006afc3..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from _typeshed import SupportsKeysAndGetItem -from collections.abc import Iterable -from typing import Generic, TypeVar, overload -from typing_extensions import final - -_KT = TypeVar("_KT") -_KT2 = TypeVar("_KT2") -_VT = TypeVar("_VT") -_VT2 = TypeVar("_VT2") - -@final -class immutabledict(dict[_KT, _VT], Generic[_KT, _VT]): - @overload - def union(self, __dict: dict[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... - @overload - def union(self, __dict: None = None, **kw: SupportsKeysAndGetItem[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... - def merge_with( - self, *args: SupportsKeysAndGetItem[_KT | _KT2, _VT2] | Iterable[tuple[_KT2, _VT2]] | None - ) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/connectors/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/connectors/__init__.pyi deleted file mode 100644 index b66d337f00a3..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/connectors/__init__.pyi +++ /dev/null @@ -1 +0,0 @@ -class Connector: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi deleted file mode 100644 index 3bf803352a7f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi +++ /dev/null @@ -1,17 +0,0 @@ -from _typeshed import Incomplete - -from . import Connector - -class MxODBCConnector(Connector): - driver: str - supports_sane_multi_rowcount: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - supports_native_decimal: 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: Incomplete | None = None) -> None: ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi deleted file mode 100644 index 7210734f90c5..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi +++ /dev/null @@ -1,22 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . import Connector - -class PyODBCConnector(Connector): - driver: str - supports_sane_rowcount_returning: bool - supports_sane_multi_rowcount: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - supports_native_decimal: bool - default_paramstyle: str - use_setinputsizes: bool - pyodbc_driver_name: Any - def __init__(self, supports_unicode_binds: Incomplete | None = None, use_setinputsizes: bool = False, **kw) -> None: ... - @classmethod - def dbapi(cls): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... - def set_isolation_level(self, connection, level) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/cprocessors.pyi b/stubs/SQLAlchemy/sqlalchemy/cprocessors.pyi deleted file mode 100644 index 93df3b165828..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/cprocessors.pyi +++ /dev/null @@ -1,15 +0,0 @@ -class DecimalResultProcessor: - def __init__(self, *args, **kwargs) -> None: ... - def process(self, *args, **kwargs): ... - -class UnicodeResultProcessor: - def __init__(self, *args, **kwargs) -> None: ... - def conditional_process(self, *args, **kwargs): ... - def process(self, *args, **kwargs): ... - -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): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi b/stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi deleted file mode 100644 index 4bf9b9ea1931..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi +++ /dev/null @@ -1,23 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Callable, Iterable, Iterator -from typing import Any, overload - -class BaseRow: - def __init__( - self, - __parent, - __processors: Iterable[Callable[[Any], Any]] | None, - __keymap: dict[Incomplete, Incomplete], - __key_style: int, - __row: Iterable[Any], - ) -> None: ... - def __reduce__(self) -> tuple[Incomplete, tuple[Incomplete, Incomplete]]: ... - def __iter__(self) -> Iterator[Any]: ... - def __len__(self) -> int: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, __key: str | int) -> tuple[Any, ...]: ... - @overload - def __getitem__(self, __key: slice) -> tuple[tuple[Any, ...]]: ... - -def safe_rowproxy_reconstructor(__cls, __state): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/databases/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/databases/__init__.pyi deleted file mode 100644 index 58f463cb74e7..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/databases/__init__.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from ..dialects.firebird import base as firebird_base -from ..dialects.mssql import base as mssql_base -from ..dialects.mysql import base as mysql_base -from ..dialects.oracle import base as oracle_base -from ..dialects.postgresql import base as postgresql_base -from ..dialects.sqlite import base as sqlite_base -from ..dialects.sybase import base as sybase_base - -__all__ = ("firebird", "mssql", "mysql", "postgresql", "sqlite", "oracle", "sybase") - -firebird = firebird_base -mssql = mssql_base -mysql = mysql_base -oracle = oracle_base -postgresql = postgresql_base -postgres = postgresql_base -sqlite = sqlite_base -sybase = sybase_base diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/__init__.pyi deleted file mode 100644 index 63292f3709ce..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/__init__.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Any - -from . import ( - firebird as firebird, - mssql as mssql, - mysql as mysql, - oracle as oracle, - postgresql as postgresql, - sqlite as sqlite, - sybase as sybase, -) - -__all__ = ("firebird", "mssql", "mysql", "oracle", "postgresql", "sqlite", "sybase") - -registry: Any -plugins: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/__init__.pyi deleted file mode 100644 index a849e4ca686d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/__init__.pyi +++ /dev/null @@ -1,34 +0,0 @@ -from typing import Any - -from .base import ( - BIGINT as BIGINT, - BLOB as BLOB, - CHAR as CHAR, - DATE as DATE, - FLOAT as FLOAT, - NUMERIC as NUMERIC, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - VARCHAR as VARCHAR, -) - -__all__ = ( - "SMALLINT", - "BIGINT", - "FLOAT", - "FLOAT", - "DATE", - "TIME", - "TEXT", - "NUMERIC", - "FLOAT", - "TIMESTAMP", - "VARCHAR", - "CHAR", - "BLOB", - "dialect", -) - -dialect: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi deleted file mode 100644 index 83dea8caaaa8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi +++ /dev/null @@ -1,108 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import default -from ...sql import compiler, sqltypes -from ...sql.sqltypes 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: Any - -class _StringType(sqltypes.String): - charset: Any - def __init__(self, charset: Incomplete | None = None, **kw) -> None: ... - -class VARCHAR(_StringType, sqltypes.VARCHAR): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class CHAR(_StringType, sqltypes.CHAR): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class _FBDateTime(sqltypes.DateTime): - def bind_processor(self, dialect): ... - -colspecs: Any -ischema_names: 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(compiler.SQLCompiler): - ansi_bind_rules: bool - def visit_now_func(self, fn, **kw): ... - def visit_startswith_op_binary(self, binary, operator, **kw): ... - def visit_not_startswith_op_binary(self, binary, operator, **kw): ... - def visit_mod_binary(self, binary, operator, **kw): ... - def visit_alias(self, alias, asfrom: bool = False, **kwargs): ... # type: ignore[override] - def visit_substring_func(self, func, **kw): ... - def visit_length_func(self, function, **kw): ... - visit_char_length_func: Any - def function_argspec(self, func, **kw): ... - def default_from(self): ... - def visit_sequence(self, seq, **kw): ... - def get_select_precolumns(self, select, **kw): ... - def limit_clause(self, select, **kw): ... - def returning_clause(self, stmt, returning_cols): ... - -class FBDDLCompiler(compiler.DDLCompiler): - def visit_create_sequence(self, create): ... - def visit_drop_sequence(self, drop): ... - def visit_computed_column(self, generated): ... - -class FBIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words: Any - illegal_initial_characters: Any - def __init__(self, dialect) -> None: ... - -class FBExecutionContext(default.DefaultExecutionContext): - def fire_sequence(self, seq, type_): ... - -class FBDialect(default.DefaultDialect): - name: str - supports_statement_cache: bool - max_identifier_length: int - supports_sequences: bool - sequences_optional: bool - supports_default_values: bool - postfetch_lastrowid: bool - supports_native_boolean: bool - requires_name_normalize: bool - supports_empty_insert: bool - statement_compiler: Any - ddl_compiler: Any - preparer: Any - type_compiler: Any - colspecs: Any - ischema_names: Any - construct_arguments: Any - def __init__(self, *args, **kwargs) -> None: ... - implicit_returning: Any - def initialize(self, connection) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] - def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_column_sequence(self, connection, table_name, column_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi deleted file mode 100644 index c2c7a025a351..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from .kinterbasdb import FBDialect_kinterbasdb - -class FBDialect_fdb(FBDialect_kinterbasdb): - supports_statement_cache: bool - def __init__(self, enable_rowcount: bool = True, retaining: bool = False, **kwargs) -> None: ... - @classmethod - def dbapi(cls): ... - def create_connect_args(self, url): ... - -dialect = FBDialect_fdb diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi deleted file mode 100644 index 8416a63aac5a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi +++ /dev/null @@ -1,39 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql.sqltypes import Float, Numeric -from .base import FBDialect, FBExecutionContext - -class _kinterbasdb_numeric: - def bind_processor(self, dialect): ... - -class _FBNumeric_kinterbasdb(_kinterbasdb_numeric, Numeric): ... -class _FBFloat_kinterbasdb(_kinterbasdb_numeric, Float): ... - -class FBExecutionContext_kinterbasdb(FBExecutionContext): - @property - def rowcount(self): ... - -class FBDialect_kinterbasdb(FBDialect): - driver: str - supports_statement_cache: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_native_decimal: bool - colspecs: Any - enable_rowcount: Any - type_conv: Any - concurrency_level: Any - retaining: Any - def __init__( - self, type_conv: int = 200, concurrency_level: int = 1, enable_rowcount: bool = True, retaining: bool = False, **kwargs - ) -> None: ... - @classmethod - def dbapi(cls): ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def do_rollback(self, dbapi_connection) -> None: ... - def do_commit(self, dbapi_connection) -> None: ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = FBDialect_kinterbasdb diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/__init__.pyi deleted file mode 100644 index c4b6c72f6f65..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/__init__.pyi +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any - -from .base import ( - BIGINT as BIGINT, - BINARY as BINARY, - BIT as BIT, - CHAR as CHAR, - DATE as DATE, - DATETIME as DATETIME, - DATETIME2 as DATETIME2, - DATETIMEOFFSET as DATETIMEOFFSET, - DECIMAL as DECIMAL, - FLOAT as FLOAT, - IMAGE as IMAGE, - INTEGER as INTEGER, - JSON as JSON, - MONEY as MONEY, - NCHAR as NCHAR, - NTEXT as NTEXT, - NUMERIC as NUMERIC, - NVARCHAR as NVARCHAR, - REAL as REAL, - ROWVERSION as ROWVERSION, - SMALLDATETIME as SMALLDATETIME, - SMALLINT as SMALLINT, - SMALLMONEY as SMALLMONEY, - SQL_VARIANT as SQL_VARIANT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - TINYINT as TINYINT, - UNIQUEIDENTIFIER as UNIQUEIDENTIFIER, - VARBINARY as VARBINARY, - VARCHAR as VARCHAR, - XML as XML, - try_cast as try_cast, -) - -__all__ = ( - "JSON", - "INTEGER", - "BIGINT", - "SMALLINT", - "TINYINT", - "VARCHAR", - "NVARCHAR", - "CHAR", - "NCHAR", - "TEXT", - "NTEXT", - "DECIMAL", - "NUMERIC", - "FLOAT", - "DATETIME", - "DATETIME2", - "DATETIMEOFFSET", - "DATE", - "TIME", - "SMALLDATETIME", - "BINARY", - "VARBINARY", - "BIT", - "REAL", - "IMAGE", - "TIMESTAMP", - "ROWVERSION", - "MONEY", - "SMALLMONEY", - "UNIQUEIDENTIFIER", - "SQL_VARIANT", - "XML", - "dialect", - "try_cast", -) - -dialect: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi deleted file mode 100644 index 2e5674285663..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi +++ /dev/null @@ -1,323 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, overload -from typing_extensions import Literal - -from ...engine import default -from ...sql import compiler, sqltypes -from ...sql.elements import Cast -from ...sql.sqltypes import ( - BIGINT as BIGINT, - BINARY as BINARY, - CHAR as CHAR, - DATE as DATE, - DATETIME as DATETIME, - DECIMAL as DECIMAL, - FLOAT as FLOAT, - INTEGER as INTEGER, - NCHAR as NCHAR, - NUMERIC as NUMERIC, - NVARCHAR as NVARCHAR, - SMALLINT as SMALLINT, - TEXT as TEXT, - VARCHAR as VARCHAR, -) -from .json import JSON as JSON - -MS_2017_VERSION: Any -MS_2016_VERSION: Any -MS_2014_VERSION: Any -MS_2012_VERSION: Any -MS_2008_VERSION: Any -MS_2005_VERSION: Any -MS_2000_VERSION: Any -RESERVED_WORDS: Any - -class REAL(sqltypes.REAL): - __visit_name__: str - def __init__(self, **kw) -> None: ... - -class TINYINT(sqltypes.Integer): - __visit_name__: str - -class _MSDate(sqltypes.Date): - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class TIME(sqltypes.TIME): - precision: Any - def __init__(self, precision: Incomplete | None = None, **kwargs) -> None: ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -_MSTime = TIME - -class _BASETIMEIMPL(TIME): - __visit_name__: str - -class _DateTimeBase: - def bind_processor(self, dialect): ... - -class _MSDateTime(_DateTimeBase, sqltypes.DateTime): ... - -class SMALLDATETIME(_DateTimeBase, sqltypes.DateTime): - __visit_name__: str - -class DATETIME2(_DateTimeBase, sqltypes.DateTime): - __visit_name__: str - precision: Any - def __init__(self, precision: Incomplete | None = None, **kw) -> None: ... - -class DATETIMEOFFSET(_DateTimeBase, sqltypes.DateTime): - __visit_name__: str - precision: Any - def __init__(self, precision: Incomplete | None = None, **kw) -> None: ... - -class _UnicodeLiteral: - def literal_processor(self, dialect): ... - -class _MSUnicode(_UnicodeLiteral, sqltypes.Unicode): ... -class _MSUnicodeText(_UnicodeLiteral, sqltypes.UnicodeText): ... - -class TIMESTAMP(sqltypes._Binary): - __visit_name__: str - length: Any - convert_int: Any - def __init__(self, convert_int: bool = False) -> None: ... - def result_processor(self, dialect, coltype): ... - -class ROWVERSION(TIMESTAMP): - __visit_name__: str - -class NTEXT(sqltypes.UnicodeText): - __visit_name__: str - -class VARBINARY(sqltypes.VARBINARY, sqltypes.LargeBinary): - __visit_name__: str - filestream: bool - @overload - def __init__(self, length: Literal["max"] | None, filestream: Literal[True]) -> None: ... - @overload - def __init__(self, *, filestream: Literal[True]) -> None: ... - @overload - def __init__(self, length: Incomplete | None = None, filestream: Literal[False] = False) -> None: ... - -class IMAGE(sqltypes.LargeBinary): - __visit_name__: str - -class XML(sqltypes.Text): - __visit_name__: str - -class BIT(sqltypes.Boolean): - __visit_name__: str - -class MONEY(sqltypes.TypeEngine): - __visit_name__: str - -class SMALLMONEY(sqltypes.TypeEngine): - __visit_name__: str - -class UNIQUEIDENTIFIER(sqltypes.TypeEngine): - __visit_name__: str - -class SQL_VARIANT(sqltypes.TypeEngine): - __visit_name__: str - -class TryCast(Cast): - __visit_name__: str - stringify_dialect: str - inherit_cache: bool - def __init__(self, *arg, **kw) -> None: ... - -try_cast: Any -MSDateTime: Any -MSDate: Any -MSReal = REAL -MSTinyInteger = TINYINT -MSTime = TIME -MSSmallDateTime = SMALLDATETIME -MSDateTime2 = DATETIME2 -MSDateTimeOffset = DATETIMEOFFSET -MSText = TEXT -MSNText = NTEXT -MSString = VARCHAR -MSNVarchar = NVARCHAR -MSChar = CHAR -MSNChar = NCHAR -MSBinary = BINARY -MSVarBinary = VARBINARY -MSImage = IMAGE -MSBit = BIT -MSMoney = MONEY -MSSmallMoney = SMALLMONEY -MSUniqueIdentifier = UNIQUEIDENTIFIER -MSVariant = SQL_VARIANT -ischema_names: Any - -class MSTypeCompiler(compiler.GenericTypeCompiler): - def visit_FLOAT(self, type_, **kw): ... - def visit_TINYINT(self, type_, **kw): ... - def visit_TIME(self, type_, **kw): ... - def visit_TIMESTAMP(self, type_, **kw): ... - def visit_ROWVERSION(self, type_, **kw): ... - def visit_datetime(self, type_, **kw): ... - def visit_DATETIMEOFFSET(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__BASETIMEIMPL(self, type_, **kw): ... - def visit_time(self, type_, **kw): ... - def visit_large_binary(self, type_, **kw): ... - def visit_IMAGE(self, type_, **kw): ... - def visit_XML(self, type_, **kw): ... - def visit_VARBINARY(self, type_, **kw): ... - def visit_boolean(self, type_, **kw): ... - def visit_BIT(self, type_, **kw): ... - def visit_JSON(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) -> None: ... - cursor_fetch_strategy: Any - def post_exec(self) -> None: ... - def get_lastrowid(self): ... - @property - def rowcount(self): ... - def handle_dbapi_exception(self, e) -> None: ... - def fire_sequence(self, seq, type_): ... - def get_insert_default(self, column): ... - -class MSSQLCompiler(compiler.SQLCompiler): - returning_precedes_values: bool - extract_map: Any - tablealiases: 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 fetch_clause(self, cs, **kwargs): ... - def limit_clause(self, cs, **kwargs): ... - def visit_try_cast(self, element, **kw): ... - def translate_select_structure(self, select_stmt, **kwargs): ... - def visit_table(self, table, mssql_aliased: bool = ..., iscrud: bool = ..., **kwargs): ... # type: ignore[override] - def visit_alias(self, alias, **kw): ... - def visit_column(self, column, add_to_result_map: Incomplete | None = ..., **kw): ... # type: ignore[override] - 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, **kw): ... - def order_by_clause(self, select, **kw): ... - def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... - def delete_table_clause(self, delete_stmt, from_table, extra_froms): ... - def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ... - def visit_empty_set_expr(self, type_): ... - def visit_is_distinct_from_binary(self, binary, operator, **kw): ... - def visit_is_not_distinct_from_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 visit_sequence(self, seq, **kw): ... - -class MSSQLStrictCompiler(MSSQLCompiler): - ansi_bind_rules: bool - def visit_in_op_binary(self, binary, operator, **kw): ... - def visit_not_in_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 = False): ... # type: ignore[override] - def visit_drop_index(self, drop): ... - def visit_primary_key_constraint(self, constraint): ... - def visit_unique_constraint(self, constraint): ... - def visit_computed_column(self, generated): ... - def visit_create_sequence(self, create, **kw): ... - def visit_identity_column(self, identity, **kw): ... - -class MSIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words: Any - def __init__(self, dialect) -> None: ... - def quote_schema(self, schema, force: Incomplete | None = None): ... - -class MSDialect(default.DefaultDialect): - name: str - supports_statement_cache: bool - supports_default_values: bool - supports_empty_insert: bool - use_scope_identity: bool - max_identifier_length: int - schema_name: str - implicit_returning: bool - full_returning: bool - colspecs: Any - engine_config_types: Any - ischema_names: Any - supports_sequences: bool - sequences_optional: bool - default_sequence_base: int - supports_native_boolean: bool - non_native_boolean_check_constraint: bool - supports_unicode_binds: bool - postfetch_lastrowid: bool - legacy_schema_aliasing: bool - server_version_info: Any - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - preparer: Any - construct_arguments: Any - query_timeout: Any - deprecate_large_types: Any - isolation_level: Any - def __init__( - self, - query_timeout: Incomplete | None = None, - use_scope_identity: bool = True, - schema_name: str = "dbo", - isolation_level: Incomplete | None = None, - deprecate_large_types: Incomplete | None = None, - json_serializer: Incomplete | None = None, - json_deserializer: Incomplete | None = None, - legacy_schema_aliasing: Incomplete | None = None, - ignore_no_transaction_on_rollback: bool = False, - **opts, - ) -> None: ... - def do_savepoint(self, connection, name) -> None: ... - def do_release_savepoint(self, connection, name) -> None: ... - def set_isolation_level(self, connection, level) -> None: ... - def get_isolation_level(self, dbapi_connection): ... - def initialize(self, connection) -> None: ... - def on_connect(self): ... - def has_table(self, connection, tablename, dbname, owner, schema): ... - def has_sequence(self, connection, sequencename, dbname, owner, schema): ... - def get_sequence_names(self, connection, dbname, owner, schema, **kw): ... - 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/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/information_schema.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/information_schema.pyi deleted file mode 100644 index f91531a75777..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/information_schema.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Any - -from ...sql import expression -from ...sql.type_api import TypeDecorator - -ischema: Any - -class CoerceUnicode(TypeDecorator): - impl: Any - cache_ok: bool - def process_bind_param(self, value, dialect): ... - def bind_expression(self, bindvalue): ... - -class _cast_on_2005(expression.ColumnElement[Any]): - bindvalue: Any - def __init__(self, bindvalue) -> None: ... - -schemata: Any -tables: Any -columns: Any -mssql_temp_table_columns: Any -constraints: Any -column_constraints: Any -key_constraints: Any -ref_constraints: Any -views: Any -computed_columns: Any -sequences: Any - -class IdentitySqlVariant(TypeDecorator): - impl: Any - cache_ok: bool - def column_expression(self, colexpr): ... - -identity_columns: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/json.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/json.pyi deleted file mode 100644 index 5d5bb5efe05d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/json.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from ...sql.sqltypes import JSON as _JSON - -class JSON(_JSON): ... - -class _FormatTypeMixin: - def bind_processor(self, dialect): ... - def literal_processor(self, dialect): ... - -class JSONIndexType(_FormatTypeMixin, _JSON.JSONIndexType): ... -class JSONPathType(_FormatTypeMixin, _JSON.JSONPathType): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi deleted file mode 100644 index 2f0a14ffaab6..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...connectors.mxodbc import MxODBCConnector -from .base import VARBINARY, MSDialect, _MSDate, _MSTime -from .pyodbc import MSExecutionContext_pyodbc, _MSNumeric_pyodbc - -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): - supports_statement_cache: bool - colspecs: Any - description_encoding: Any - def __init__(self, description_encoding: Incomplete | None = None, **params) -> None: ... - -dialect = MSDialect_mxodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/provision.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pymssql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pymssql.pyi deleted file mode 100644 index 01e796368015..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pymssql.pyi +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Any - -from ...sql.sqltypes import Numeric -from .base import MSDialect, MSIdentifierPreparer - -class _MSNumeric_pymssql(Numeric): - def result_processor(self, dialect, type_): ... - -class MSIdentifierPreparer_pymssql(MSIdentifierPreparer): - def __init__(self, dialect) -> None: ... - -class MSDialect_pymssql(MSDialect): - supports_statement_cache: bool - supports_native_decimal: bool - driver: str - preparer: Any - colspecs: Any - @classmethod - def dbapi(cls): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - def set_isolation_level(self, connection, level) -> None: ... - -dialect = MSDialect_pymssql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi deleted file mode 100644 index 70e6e362b54d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi +++ /dev/null @@ -1,45 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...connectors.pyodbc import PyODBCConnector -from ...sql.sqltypes import DateTime, Float, Numeric -from .base import BINARY, DATETIMEOFFSET, VARBINARY, MSDialect, MSExecutionContext - -class _ms_numeric_pyodbc: - def bind_processor(self, dialect): ... - -class _MSNumeric_pyodbc(_ms_numeric_pyodbc, Numeric): ... -class _MSFloat_pyodbc(_ms_numeric_pyodbc, Float): ... - -class _ms_binary_pyodbc: - def bind_processor(self, dialect): ... - -class _ODBCDateTimeBindProcessor: - has_tz: bool - def bind_processor(self, dialect): ... - -class _ODBCDateTime(_ODBCDateTimeBindProcessor, DateTime): ... - -class _ODBCDATETIMEOFFSET(_ODBCDateTimeBindProcessor, DATETIMEOFFSET): - has_tz: bool - -class _VARBINARY_pyodbc(_ms_binary_pyodbc, VARBINARY): ... -class _BINARY_pyodbc(_ms_binary_pyodbc, BINARY): ... - -class MSExecutionContext_pyodbc(MSExecutionContext): - def pre_exec(self) -> None: ... - def post_exec(self) -> None: ... - -class MSDialect_pyodbc(PyODBCConnector, MSDialect): - supports_statement_cache: bool - supports_sane_rowcount_returning: bool - colspecs: Any - description_encoding: Any - use_scope_identity: Any - fast_executemany: Any - def __init__(self, description_encoding: Incomplete | None = None, fast_executemany: bool = False, **params) -> None: ... - def on_connect(self): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = MSDialect_pyodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/__init__.pyi deleted file mode 100644 index faaa7d6e642a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/__init__.pyi +++ /dev/null @@ -1,85 +0,0 @@ -from typing import Any - -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, - FLOAT as FLOAT, - INTEGER as INTEGER, - JSON as JSON, - 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, - SET as SET, - SMALLINT as SMALLINT, - 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, -) -from .dml import Insert as Insert, insert as insert -from .expression import match as match - -__all__ = ( - "BIGINT", - "BINARY", - "BIT", - "BLOB", - "BOOLEAN", - "CHAR", - "DATE", - "DATETIME", - "DECIMAL", - "DOUBLE", - "ENUM", - "DECIMAL", - "FLOAT", - "INTEGER", - "INTEGER", - "JSON", - "LONGBLOB", - "LONGTEXT", - "MEDIUMBLOB", - "MEDIUMINT", - "MEDIUMTEXT", - "NCHAR", - "NVARCHAR", - "NUMERIC", - "SET", - "SMALLINT", - "REAL", - "TEXT", - "TIME", - "TIMESTAMP", - "TINYBLOB", - "TINYINT", - "TINYTEXT", - "VARBINARY", - "VARCHAR", - "YEAR", - "dialect", - "insert", - "Insert", - "match", -) - -dialect: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi deleted file mode 100644 index a91b28976d81..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi +++ /dev/null @@ -1,74 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import AdaptedConnection -from .pymysql import MySQLDialect_pymysql - -class AsyncAdapt_aiomysql_cursor: - server_side: bool - await_: Any - def __init__(self, adapt_connection) -> None: ... - @property - def description(self): ... - @property - def rowcount(self): ... - @property - def arraysize(self): ... - @arraysize.setter - def arraysize(self, value) -> None: ... - @property - def lastrowid(self): ... - def close(self) -> None: ... - def execute(self, operation, parameters: Incomplete | None = None): ... - def executemany(self, operation, seq_of_parameters): ... - def setinputsizes(self, *inputsizes) -> None: ... - def __iter__(self): ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor): - server_side: bool - await_: Any - def __init__(self, adapt_connection) -> None: ... - def close(self) -> None: ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_aiomysql_connection(AdaptedConnection): - await_: Any - dbapi: Any - def __init__(self, dbapi, connection) -> None: ... - def ping(self, reconnect): ... - def character_set_name(self): ... - def autocommit(self, value) -> None: ... - def cursor(self, server_side: bool = False): ... - def rollback(self) -> None: ... - def commit(self) -> None: ... - def close(self) -> None: ... - -class AsyncAdaptFallback_aiomysql_connection(AsyncAdapt_aiomysql_connection): - await_: Any - -class AsyncAdapt_aiomysql_dbapi: - aiomysql: Any - pymysql: Any - paramstyle: str - def __init__(self, aiomysql, pymysql) -> None: ... - def connect(self, *arg, **kw): ... - -class MySQLDialect_aiomysql(MySQLDialect_pymysql): - driver: str - supports_statement_cache: bool - supports_server_side_cursors: bool - is_async: bool - @classmethod - def dbapi(cls): ... - @classmethod - def get_pool_class(cls, url): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - def get_driver_connection(self, connection): ... - -dialect = MySQLDialect_aiomysql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi deleted file mode 100644 index 1661a2922cab..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi +++ /dev/null @@ -1,84 +0,0 @@ -from _typeshed import Incomplete, ReadableBuffer -from collections.abc import Iterable -from typing import Any, SupportsBytes -from typing_extensions import SupportsIndex - -from ...engine import AdaptedConnection -from .pymysql import MySQLDialect_pymysql - -class AsyncAdapt_asyncmy_cursor: - server_side: bool - await_: Any - def __init__(self, adapt_connection) -> None: ... - @property - def description(self): ... - @property - def rowcount(self): ... - @property - def arraysize(self): ... - @arraysize.setter - def arraysize(self, value) -> None: ... - @property - def lastrowid(self): ... - def close(self) -> None: ... - def execute(self, operation, parameters: Incomplete | None = None): ... - def executemany(self, operation, seq_of_parameters): ... - def setinputsizes(self, *inputsizes) -> None: ... - def __iter__(self): ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_asyncmy_ss_cursor(AsyncAdapt_asyncmy_cursor): - server_side: bool - await_: Any - def __init__(self, adapt_connection) -> None: ... - def close(self) -> None: ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_asyncmy_connection(AdaptedConnection): - await_: Any - dbapi: Any - def __init__(self, dbapi, connection) -> None: ... - def ping(self, reconnect): ... - def character_set_name(self): ... - def autocommit(self, value) -> None: ... - def cursor(self, server_side: bool = False): ... - def rollback(self) -> None: ... - def commit(self) -> None: ... - def close(self) -> None: ... - -class AsyncAdaptFallback_asyncmy_connection(AsyncAdapt_asyncmy_connection): - await_: Any - -def _Binary(x: Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer) -> bytes: ... - -class AsyncAdapt_asyncmy_dbapi: - asyncmy: Any - pymysql: Any - paramstyle: str - STRING: Incomplete - NUMBER: Incomplete - BINARY: Incomplete - DATETIME: Incomplete - TIMESTAMP: Incomplete - Binary = staticmethod(_Binary) - def __init__(self, asyncmy: Any) -> None: ... - def connect(self, *arg, **kw): ... - -class MySQLDialect_asyncmy(MySQLDialect_pymysql): - driver: str - supports_statement_cache: bool - supports_server_side_cursors: bool - is_async: bool - @classmethod - def dbapi(cls): ... - @classmethod - def get_pool_class(cls, url): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - def get_driver_connection(self, connection): ... - -dialect = MySQLDialect_asyncmy diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi deleted file mode 100644 index cae8666749fb..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi +++ /dev/null @@ -1,241 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import default -from ...sql import compiler -from ...sql.sqltypes import BINARY as BINARY, BLOB as BLOB, BOOLEAN as BOOLEAN, DATE as DATE, VARBINARY as VARBINARY -from .enumerated import ENUM as ENUM, SET as SET -from .json import JSON as JSON -from .reserved_words import RESERVED_WORDS_MARIADB as RESERVED_WORDS_MARIADB, RESERVED_WORDS_MYSQL as RESERVED_WORDS_MYSQL -from .types import ( - BIGINT as BIGINT, - BIT as BIT, - CHAR as CHAR, - DATETIME as DATETIME, - DECIMAL as DECIMAL, - 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, -) - -AUTOCOMMIT_RE: Any -SET_RE: Any -MSTime = TIME -MSSet = SET -MSEnum = ENUM -MSLongBlob = LONGBLOB -MSMediumBlob = MEDIUMBLOB -MSTinyBlob = TINYBLOB -MSBlob = BLOB -MSBinary = BINARY -MSVarBinary = VARBINARY -MSNChar = NCHAR -MSNVarChar = NVARCHAR -MSChar = CHAR -MSString = VARCHAR -MSLongText = LONGTEXT -MSMediumText = MEDIUMTEXT -MSTinyText = TINYTEXT -MSText = TEXT -MSYear = YEAR -MSTimeStamp = TIMESTAMP -MSBit = BIT -MSSmallInteger = SMALLINT -MSTinyInteger = TINYINT -MSMediumInteger = MEDIUMINT -MSBigInteger = BIGINT -MSNumeric = NUMERIC -MSDecimal = DECIMAL -MSDouble = DOUBLE -MSReal = REAL -MSFloat = FLOAT -MSInteger = INTEGER -colspecs: Any -ischema_names: Any - -class MySQLExecutionContext(default.DefaultExecutionContext): - def should_autocommit_text(self, statement): ... - def create_server_side_cursor(self): ... - def fire_sequence(self, seq, type_): ... - -class MySQLCompiler(compiler.SQLCompiler): - render_table_with_column_in_update_from: bool - extract_map: Any - def default_from(self): ... - def visit_random_func(self, fn, **kw): ... - def visit_sequence(self, seq, **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_on_duplicate_key_update(self, on_duplicate, **kw): ... - def visit_concat_op_binary(self, binary, operator, **kw): ... - def visit_mysql_match(self, element, **kw): ... - def visit_match_op_binary(self, binary, operator, **kw): ... - def get_from_hint_text(self, table, text): ... - def visit_typeclause(self, typeclause, type_: Incomplete | None = None, **kw): ... - def visit_cast(self, cast, **kw): ... - def render_literal_value(self, value, type_): ... - def visit_true(self, element, **kw): ... - def visit_false(self, element, **kw): ... - def get_select_precolumns(self, select, **kw): ... - def visit_join(self, join, asfrom: bool = False, from_linter: Incomplete | None = None, **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) -> None: ... - def delete_table_clause(self, delete_stmt, from_table, extra_froms): ... - def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ... - def visit_empty_set_expr(self, element_types): ... - def visit_is_distinct_from_binary(self, binary, operator, **kw): ... - def visit_is_not_distinct_from_binary(self, binary, operator, **kw): ... - def visit_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_regexp_replace_op_binary(self, binary, operator, **kw): ... - -class MySQLDDLCompiler(compiler.DDLCompiler): - def get_column_specification(self, column, **kw): ... - def post_create_table(self, table): ... - def visit_create_index(self, create, **kw): ... - def visit_primary_key_constraint(self, constraint): ... - def visit_drop_index(self, drop): ... - def visit_drop_constraint(self, drop): ... - def define_constraint_match(self, constraint): ... - def visit_set_table_comment(self, create): ... - def visit_drop_table_comment(self, create): ... - def visit_set_column_comment(self, create): ... - -class MySQLTypeCompiler(compiler.GenericTypeCompiler): - def visit_NUMERIC(self, type_, **kw): ... - def visit_DECIMAL(self, type_, **kw): ... - def visit_DOUBLE(self, type_, **kw): ... - def visit_REAL(self, type_, **kw): ... - def visit_FLOAT(self, type_, **kw): ... - def visit_INTEGER(self, type_, **kw): ... - def visit_BIGINT(self, type_, **kw): ... - def visit_MEDIUMINT(self, type_, **kw): ... - def visit_TINYINT(self, type_, **kw): ... - def visit_SMALLINT(self, type_, **kw): ... - def visit_BIT(self, type_, **kw): ... - def visit_DATETIME(self, type_, **kw): ... - def visit_DATE(self, type_, **kw): ... - def visit_TIME(self, type_, **kw): ... - def visit_TIMESTAMP(self, type_, **kw): ... - def visit_YEAR(self, type_, **kw): ... - def visit_TEXT(self, type_, **kw): ... - def visit_TINYTEXT(self, type_, **kw): ... - def visit_MEDIUMTEXT(self, type_, **kw): ... - def visit_LONGTEXT(self, type_, **kw): ... - def visit_VARCHAR(self, type_, **kw): ... - def visit_CHAR(self, type_, **kw): ... - 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): ... - def visit_TINYBLOB(self, type_, **kw): ... - def visit_MEDIUMBLOB(self, type_, **kw): ... - def visit_LONGBLOB(self, type_, **kw): ... - def visit_ENUM(self, type_, **kw): ... - def visit_SET(self, type_, **kw): ... - def visit_BOOLEAN(self, type_, **kw): ... - -class MySQLIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words: Any - def __init__(self, dialect, server_ansiquotes: bool = False, **kw) -> None: ... - -class MariaDBIdentifierPreparer(MySQLIdentifierPreparer): - reserved_words: Any - -class MySQLDialect(default.DefaultDialect): - logger: Any - name: str - supports_statement_cache: bool - supports_alter: bool - supports_native_boolean: bool - max_identifier_length: int - max_index_name_length: int - max_constraint_name_length: int - supports_native_enum: bool - supports_sequences: bool - sequences_optional: bool - supports_for_update_of: bool - supports_default_values: bool - supports_default_metavalue: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_multivalues_insert: bool - supports_comments: bool - inline_comments: bool - default_paramstyle: str - colspecs: Any - cte_follows_insert: bool - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - ischema_names: Any - preparer: Any - is_mariadb: bool - construct_arguments: Any - isolation_level: Any - def __init__( - self, - isolation_level: Incomplete | None = None, - json_serializer: Incomplete | None = None, - json_deserializer: Incomplete | None = None, - is_mariadb: Incomplete | None = None, - **kwargs, - ) -> None: ... - def on_connect(self): ... - def set_isolation_level(self, connection, level) -> None: ... - def get_isolation_level(self, connection): ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_recover_twophase(self, connection): ... - def is_disconnect(self, e, connection, cursor): ... - def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] - def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw): ... - identifier_preparer: Any - def initialize(self, connection) -> None: ... - def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_table_options(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_table_comment(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... - -class _DecodingRow: - rowproxy: Any - charset: Any - def __init__(self, rowproxy, charset) -> None: ... - def __getitem__(self, index): ... - def __getattr__(self, attr: str): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/cymysql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/cymysql.pyi deleted file mode 100644 index 408d931df22d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/cymysql.pyi +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Any - -from .base import BIT -from .mysqldb import MySQLDialect_mysqldb - -class _cymysqlBIT(BIT): - def result_processor(self, dialect, coltype): ... - -class MySQLDialect_cymysql(MySQLDialect_mysqldb): - driver: str - supports_statement_cache: bool - description_encoding: Any - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_unicode_statements: bool - colspecs: Any - @classmethod - def dbapi(cls): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = MySQLDialect_cymysql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/dml.pyi deleted file mode 100644 index 47463bbc4767..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/dml.pyi +++ /dev/null @@ -1,23 +0,0 @@ -from typing import Any - -from ...sql.dml import Insert as StandardInsert -from ...sql.elements import ClauseElement -from ...util.langhelpers import memoized_property - -class Insert(StandardInsert): - stringify_dialect: str - inherit_cache: bool - @property - def inserted(self): ... - @memoized_property - def inserted_alias(self): ... - def on_duplicate_key_update(self, *args, **kw) -> None: ... - -insert: Any - -class OnDuplicateClause(ClauseElement): - __visit_name__: str - stringify_dialect: str - inserted_alias: Any - update: Any - def __init__(self, inserted_alias, update) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/enumerated.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/enumerated.pyi deleted file mode 100644 index e75307ef9ac2..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/enumerated.pyi +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Any - -from ...sql import sqltypes -from .types import _StringType - -class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum, _StringType): # type: ignore[misc] # incompatible with base class - __visit_name__: str - native_enum: bool - def __init__(self, *enums, **kw) -> None: ... - @classmethod - def adapt_emulated_to_native(cls, impl, **kw): ... - -class SET(_StringType): - __visit_name__: str - retrieve_as_bitwise: Any - values: 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/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/expression.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/expression.pyi deleted file mode 100644 index 24d63634ffac..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/expression.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any - -from ...sql import elements -from ...sql.base import Generative - -class match(Generative, elements.BinaryExpression): - __visit_name__: str - inherit_cache: bool - def __init__(self, *cols, **kw) -> None: ... - modifiers: Any - def in_boolean_mode(self) -> None: ... - def in_natural_language_mode(self) -> None: ... - def with_query_expansion(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/json.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/json.pyi deleted file mode 100644 index 8baa9ff03c5a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/json.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from ...sql import 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/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadb.pyi deleted file mode 100644 index db8f5abd5f09..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadb.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Any - -from .base import MySQLDialect - -class MariaDBDialect(MySQLDialect): - is_mariadb: bool - supports_statement_cache: bool - name: str - preparer: Any - -def loader(driver): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi deleted file mode 100644 index b4ab06a53fea..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Any - -from .base import MySQLCompiler, MySQLDialect, MySQLExecutionContext - -mariadb_cpy_minimum_version: Any - -class MySQLExecutionContext_mariadbconnector(MySQLExecutionContext): - def create_server_side_cursor(self): ... - def create_default_cursor(self): ... - -class MySQLCompiler_mariadbconnector(MySQLCompiler): ... - -class MySQLDialect_mariadbconnector(MySQLDialect): - driver: str - supports_statement_cache: bool - supports_unicode_statements: bool - encoding: str - convert_unicode: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_native_decimal: bool - default_paramstyle: str - statement_compiler: Any - supports_server_side_cursors: bool - paramstyle: str - def __init__(self, **kwargs) -> None: ... - @classmethod - def dbapi(cls): ... - def is_disconnect(self, e, connection, cursor): ... - def create_connect_args(self, url): ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - -dialect = MySQLDialect_mariadbconnector diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqlconnector.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqlconnector.pyi deleted file mode 100644 index 5ee626ed9d9d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqlconnector.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from typing import Any - -from ...util.langhelpers import memoized_property -from .base import BIT, MySQLCompiler, MySQLDialect, MySQLIdentifierPreparer - -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) -> None: ... - -class MySQLDialect_mysqlconnector(MySQLDialect): - driver: str - supports_statement_cache: bool - supports_unicode_binds: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_native_decimal: bool - default_paramstyle: str - statement_compiler: Any - preparer: Any - colspecs: Any - def __init__(self, *arg, **kw) -> None: ... - @property - def description_encoding(self): ... - @memoized_property - def supports_unicode_statements(self): ... - @classmethod - def dbapi(cls): ... - def do_ping(self, dbapi_connection): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = MySQLDialect_mysqlconnector diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi deleted file mode 100644 index 8c0bff8fab9f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi +++ /dev/null @@ -1,33 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...util.langhelpers import memoized_property -from .base import MySQLCompiler, MySQLDialect, MySQLExecutionContext - -class MySQLExecutionContext_mysqldb(MySQLExecutionContext): - @property - def rowcount(self): ... - -class MySQLCompiler_mysqldb(MySQLCompiler): ... - -class MySQLDialect_mysqldb(MySQLDialect): - driver: str - supports_statement_cache: bool - supports_unicode_statements: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_native_decimal: bool - default_paramstyle: str - statement_compiler: Any - preparer: Any - def __init__(self, **kwargs) -> None: ... - @memoized_property - def supports_server_side_cursors(self): ... - @classmethod - def dbapi(cls): ... - def on_connect(self): ... - def do_ping(self, dbapi_connection): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def create_connect_args(self, url, _translate_args: Incomplete | None = None): ... - -dialect = MySQLDialect_mysqldb diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi deleted file mode 100644 index fa7ea6fbe59d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi +++ /dev/null @@ -1,40 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from .base import BIT, MySQLDialect, MySQLExecutionContext - -class _oursqlBIT(BIT): - def result_processor(self, dialect, coltype) -> None: ... - -class MySQLExecutionContext_oursql(MySQLExecutionContext): - @property - def plain_query(self): ... - -class MySQLDialect_oursql(MySQLDialect): - driver: str - supports_statement_cache: bool - supports_unicode_binds: bool - supports_unicode_statements: bool - supports_native_decimal: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - colspecs: Any - @classmethod - def dbapi(cls): ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def do_begin(self, connection) -> None: ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] - def get_table_options(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = None, **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 = MySQLDialect_oursql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/provision.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi deleted file mode 100644 index cf2e137c6926..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...util.langhelpers import memoized_property -from .mysqldb import MySQLDialect_mysqldb - -class MySQLDialect_pymysql(MySQLDialect_mysqldb): - driver: str - supports_statement_cache: bool - description_encoding: Any - supports_unicode_statements: bool - supports_unicode_binds: bool - @memoized_property - def supports_server_side_cursors(self): ... - @classmethod - def dbapi(cls): ... - def create_connect_args(self, url, _translate_args: Incomplete | None = None): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = MySQLDialect_pymysql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pyodbc.pyi deleted file mode 100644 index f9363c3cc0b0..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pyodbc.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Any - -from ...connectors.pyodbc import PyODBCConnector -from .base import MySQLDialect, MySQLExecutionContext -from .types import TIME - -class _pyodbcTIME(TIME): - def result_processor(self, dialect, coltype): ... - -class MySQLExecutionContext_pyodbc(MySQLExecutionContext): - def get_lastrowid(self): ... - -class MySQLDialect_pyodbc(PyODBCConnector, MySQLDialect): - supports_statement_cache: bool - colspecs: Any - supports_unicode_statements: bool - pyodbc_driver_name: str - def on_connect(self): ... - -dialect = MySQLDialect_pyodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi deleted file mode 100644 index f27c18525823..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Any - -class ReflectedState: - columns: Any - table_options: Any - table_name: Any - keys: Any - fk_constraints: Any - ck_constraints: Any - -class MySQLTableDefinitionParser: - logger: Any - dialect: Any - preparer: Any - def __init__(self, dialect, preparer) -> None: ... - def parse(self, show_create, charset): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reserved_words.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reserved_words.pyi deleted file mode 100644 index 28a741b2b19d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reserved_words.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from typing import Any - -RESERVED_WORDS_MARIADB: Any -RESERVED_WORDS_MYSQL: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi deleted file mode 100644 index 49252518bf6b..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi +++ /dev/null @@ -1,158 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import sqltypes - -class _NumericType: - unsigned: Any - zerofill: Any - def __init__(self, unsigned: bool = False, zerofill: bool = False, **kw) -> None: ... - -class _FloatType(_NumericType, sqltypes.Float): - scale: Any - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw - ) -> None: ... - -class _IntegerType(_NumericType, sqltypes.Integer): - display_width: Any - def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... - -class _StringType(sqltypes.String): - charset: Any - ascii: Any - unicode: Any - binary: Any - national: Any - def __init__( - self, - charset: Incomplete | None = None, - collation: Incomplete | None = None, - ascii: bool = False, - binary: bool = False, - unicode: bool = False, - national: bool = False, - **kw, - ) -> None: ... - -class _MatchType(sqltypes.Float, sqltypes.MatchType): # type: ignore[misc] # incompatible with base class - def __init__(self, **kw) -> None: ... - -class NUMERIC(_NumericType, sqltypes.NUMERIC): - __visit_name__: str - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw - ) -> None: ... - -class DECIMAL(_NumericType, sqltypes.DECIMAL): - __visit_name__: str - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw - ) -> None: ... - -class DOUBLE(_FloatType): - __visit_name__: str - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw - ) -> None: ... - -class REAL(_FloatType, sqltypes.REAL): - __visit_name__: str - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw - ) -> None: ... - -class FLOAT(_FloatType, sqltypes.FLOAT): - __visit_name__: str - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = False, **kw - ) -> None: ... - def bind_processor(self, dialect) -> None: ... - -class INTEGER(_IntegerType, sqltypes.INTEGER): - __visit_name__: str - def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... - -class BIGINT(_IntegerType, sqltypes.BIGINT): - __visit_name__: str - def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... - -class MEDIUMINT(_IntegerType): - __visit_name__: str - def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... - -class TINYINT(_IntegerType): - __visit_name__: str - def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... - -class SMALLINT(_IntegerType, sqltypes.SMALLINT): - __visit_name__: str - def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... - -class BIT(sqltypes.TypeEngine): - __visit_name__: str - length: Any - def __init__(self, length: Incomplete | None = None) -> None: ... - def result_processor(self, dialect, coltype): ... - -class TIME(sqltypes.TIME): - __visit_name__: str - fsp: Any - def __init__(self, timezone: bool = False, fsp: Incomplete | None = None) -> None: ... - def result_processor(self, dialect, coltype): ... - -class TIMESTAMP(sqltypes.TIMESTAMP): - __visit_name__: str - fsp: Any - def __init__(self, timezone: bool = False, fsp: Incomplete | None = None) -> None: ... - -class DATETIME(sqltypes.DATETIME): - __visit_name__: str - fsp: Any - def __init__(self, timezone: bool = False, fsp: Incomplete | None = None) -> None: ... - -class YEAR(sqltypes.TypeEngine): - __visit_name__: str - display_width: Any - def __init__(self, display_width: Incomplete | None = None) -> None: ... - -class TEXT(_StringType, sqltypes.TEXT): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kw) -> None: ... - -class TINYTEXT(_StringType): - __visit_name__: str - def __init__(self, **kwargs) -> None: ... - -class MEDIUMTEXT(_StringType): - __visit_name__: str - def __init__(self, **kwargs) -> None: ... - -class LONGTEXT(_StringType): - __visit_name__: str - def __init__(self, **kwargs) -> None: ... - -class VARCHAR(_StringType, sqltypes.VARCHAR): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class CHAR(_StringType, sqltypes.CHAR): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class NVARCHAR(_StringType, sqltypes.NVARCHAR): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class NCHAR(_StringType, sqltypes.NCHAR): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class TINYBLOB(sqltypes._Binary): - __visit_name__: str - -class MEDIUMBLOB(sqltypes._Binary): - __visit_name__: str - -class LONGBLOB(sqltypes._Binary): - __visit_name__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/__init__.pyi deleted file mode 100644 index 3cc1662ff2f1..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/__init__.pyi +++ /dev/null @@ -1,52 +0,0 @@ -from typing import Any - -from .base import ( - BFILE as BFILE, - BINARY_DOUBLE as BINARY_DOUBLE, - BINARY_FLOAT as BINARY_FLOAT, - BLOB as BLOB, - CHAR as CHAR, - CLOB as CLOB, - DATE as DATE, - DOUBLE_PRECISION as DOUBLE_PRECISION, - FLOAT as FLOAT, - INTERVAL as INTERVAL, - LONG as LONG, - NCHAR as NCHAR, - NCLOB as NCLOB, - NUMBER as NUMBER, - NVARCHAR as NVARCHAR, - NVARCHAR2 as NVARCHAR2, - RAW as RAW, - ROWID as ROWID, - TIMESTAMP as TIMESTAMP, - VARCHAR as VARCHAR, - VARCHAR2 as VARCHAR2, -) - -__all__ = ( - "VARCHAR", - "NVARCHAR", - "CHAR", - "NCHAR", - "DATE", - "NUMBER", - "BLOB", - "BFILE", - "CLOB", - "NCLOB", - "TIMESTAMP", - "RAW", - "FLOAT", - "DOUBLE_PRECISION", - "BINARY_DOUBLE", - "BINARY_FLOAT", - "LONG", - "dialect", - "INTERVAL", - "VARCHAR2", - "NVARCHAR2", - "ROWID", -) - -dialect: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi deleted file mode 100644 index 2a90fcf552f3..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi +++ /dev/null @@ -1,222 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import default -from ...sql import ClauseElement, compiler, sqltypes -from ...sql.sqltypes import ( - BLOB as BLOB, - CHAR as CHAR, - CLOB as CLOB, - FLOAT as FLOAT, - INTEGER as INTEGER, - NCHAR as NCHAR, - NVARCHAR as NVARCHAR, - TIMESTAMP as TIMESTAMP, - VARCHAR as VARCHAR, -) - -RESERVED_WORDS: Any -NO_ARG_FNS: Any - -class RAW(sqltypes._Binary): - __visit_name__: str - -OracleRaw = RAW - -class NCLOB(sqltypes.Text): - __visit_name__: str - -class VARCHAR2(VARCHAR): - __visit_name__: str - -NVARCHAR2 = NVARCHAR - -class NUMBER(sqltypes.Numeric, sqltypes.Integer): - __visit_name__: str - def __init__( - self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: Incomplete | None = None - ) -> None: ... - def adapt(self, impltype): ... - -class DOUBLE_PRECISION(sqltypes.Float): - __visit_name__: str - -class BINARY_DOUBLE(sqltypes.Float): - __visit_name__: str - -class BINARY_FLOAT(sqltypes.Float): - __visit_name__: str - -class BFILE(sqltypes.LargeBinary): - __visit_name__: str - -class LONG(sqltypes.Text): - __visit_name__: str - -class DATE(sqltypes.DateTime): - __visit_name__: str - -class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval): - __visit_name__: str - day_precision: Any - second_precision: Any - def __init__(self, day_precision: Incomplete | None = None, second_precision: Incomplete | None = None) -> None: ... - def as_generic(self, allow_nulltype: bool = False): ... - def coerce_compared_value(self, op, value): ... - -class ROWID(sqltypes.TypeEngine): - __visit_name__: str - -class _OracleBoolean(sqltypes.Boolean): - def get_dbapi_type(self, dbapi): ... - -colspecs: Any -ischema_names: 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_BINARY_DOUBLE(self, type_, **kw): ... - def visit_BINARY_FLOAT(self, type_, **kw): ... - def visit_FLOAT(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: 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: 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 visit_function(self, func, **kw): ... - def visit_table_valued_column(self, element, **kw): ... - def default_from(self): ... - def visit_join(self, join, from_linter: Incomplete | None = None, **kwargs): ... # type: ignore[override] - def visit_outer_join_column(self, vc, **kw): ... - def visit_sequence(self, seq, **kw): ... - def get_render_as_alias_suffix(self, alias_name_text): ... - has_out_parameters: bool - def returning_clause(self, stmt, returning_cols): ... - def translate_select_structure(self, select_stmt, **kwargs): ... - def limit_clause(self, select, **kw): ... - def visit_empty_set_expr(self, type_): ... - def for_update_clause(self, select, **kw): ... - def visit_is_distinct_from_binary(self, binary, operator, **kw): ... - def visit_is_not_distinct_from_binary(self, binary, operator, **kw): ... - def visit_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_regexp_replace_op_binary(self, binary, operator, **kw): ... - -class OracleDDLCompiler(compiler.DDLCompiler): - def define_constraint_cascades(self, constraint): ... - def visit_drop_table_comment(self, drop): ... - def visit_create_index(self, create): ... - def post_create_table(self, table): ... - def get_identity_options(self, identity_options): ... - def visit_computed_column(self, generated): ... - def visit_identity_column(self, identity, **kw): ... - -class OracleIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words: Any - illegal_initial_characters: Any - def format_savepoint(self, savepoint): ... - -class OracleExecutionContext(default.DefaultExecutionContext): - def fire_sequence(self, seq, type_): ... - -class OracleDialect(default.DefaultDialect): - name: str - supports_statement_cache: bool - supports_alter: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - max_identifier_length: int - supports_simple_order_by_label: bool - cte_follows_insert: bool - supports_sequences: bool - sequences_optional: bool - postfetch_lastrowid: bool - default_paramstyle: str - colspecs: Any - ischema_names: Any - requires_name_normalize: bool - supports_comments: bool - supports_default_values: bool - supports_default_metavalue: bool - supports_empty_insert: bool - supports_identity_columns: bool - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - preparer: Any - reflection_options: Any - construct_arguments: Any - use_ansi: Any - optimize_limits: Any - exclude_tablespaces: Any - def __init__( - self, - use_ansi: bool = True, - optimize_limits: bool = False, - use_binds_for_limits: Incomplete | None = None, - use_nchar_for_unicode: bool = False, - exclude_tablespaces=("SYSTEM", "SYSAUX"), - **kwargs, - ) -> None: ... - implicit_returning: Any - def initialize(self, connection) -> None: ... - def do_release_savepoint(self, connection, name) -> None: ... - def get_isolation_level(self, connection) -> None: ... - def get_default_isolation_level(self, dbapi_conn): ... - def set_isolation_level(self, connection, level) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] - def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_temp_table_names(self, connection, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_table_options(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_table_comment( - self, connection, table_name, schema: Incomplete | None = None, resolve_synonyms: bool = False, dblink: str = "", **kw - ): ... - def get_indexes( - self, connection, table_name, schema: Incomplete | None = None, resolve_synonyms: bool = False, dblink: str = "", **kw - ): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_view_definition( - self, connection, view_name, schema: Incomplete | None = None, resolve_synonyms: bool = False, dblink: str = "", **kw - ): ... - def get_check_constraints( - self, connection, table_name, schema: Incomplete | None = None, include_all: bool = False, **kw - ): ... - -class _OuterJoinColumn(ClauseElement): - __visit_name__: str - column: Any - def __init__(self, column) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi deleted file mode 100644 index c7fed1770d45..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi +++ /dev/null @@ -1,127 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import sqltypes -from . import base as oracle -from .base import OracleCompiler, OracleDialect, OracleExecutionContext - -class _OracleInteger(sqltypes.Integer): - def get_dbapi_type(self, dbapi): ... - -class _OracleNumeric(sqltypes.Numeric): - is_number: bool - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype) -> None: ... - -class _OracleBinaryFloat(_OracleNumeric): - def get_dbapi_type(self, dbapi): ... - -class _OracleBINARY_FLOAT(_OracleBinaryFloat, oracle.BINARY_FLOAT): ... -class _OracleBINARY_DOUBLE(_OracleBinaryFloat, oracle.BINARY_DOUBLE): ... - -class _OracleNUMBER(_OracleNumeric): - is_number: bool - -class _OracleDate(sqltypes.Date): - def bind_processor(self, dialect) -> None: ... - def result_processor(self, dialect, coltype): ... - -class _OracleChar(sqltypes.CHAR): - def get_dbapi_type(self, dbapi): ... - -class _OracleNChar(sqltypes.NCHAR): - def get_dbapi_type(self, dbapi): ... - -class _OracleUnicodeStringNCHAR(oracle.NVARCHAR2): - def get_dbapi_type(self, dbapi): ... - -class _OracleUnicodeStringCHAR(sqltypes.Unicode): - def get_dbapi_type(self, dbapi): ... - -class _OracleUnicodeTextNCLOB(oracle.NCLOB): - def get_dbapi_type(self, dbapi): ... - -class _OracleUnicodeTextCLOB(sqltypes.UnicodeText): - def get_dbapi_type(self, dbapi): ... - -class _OracleText(sqltypes.Text): - def get_dbapi_type(self, dbapi): ... - -class _OracleLong(oracle.LONG): - def get_dbapi_type(self, dbapi): ... - -class _OracleString(sqltypes.String): ... - -class _OracleEnum(sqltypes.Enum): - def bind_processor(self, dialect): ... - -class _OracleBinary(sqltypes.LargeBinary): - def get_dbapi_type(self, dbapi): ... - def bind_processor(self, dialect) -> None: ... - def result_processor(self, dialect, coltype): ... - -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: Any - include_set_input_sizes: Any - def pre_exec(self) -> None: ... - cursor_fetch_strategy: Any - def post_exec(self) -> None: ... - def create_cursor(self): ... - def get_out_parameter_values(self, out_param_names): ... - -class OracleDialect_cx_oracle(OracleDialect): - supports_statement_cache: bool - statement_compiler: Any - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - use_setinputsizes: bool - driver: str - colspecs: Any - execute_sequence_format: Any - arraysize: Any - encoding_errors: Any - auto_convert_lobs: Any - coerce_to_unicode: Any - coerce_to_decimal: Any - cx_oracle_ver: Any - def __init__( - self, - auto_convert_lobs: bool = True, - coerce_to_unicode: bool = True, - coerce_to_decimal: bool = True, - arraysize: int = 50, - encoding_errors: Incomplete | None = None, - threaded: Incomplete | None = None, - **kwargs, - ): ... - @classmethod - def dbapi(cls): ... - def initialize(self, connection) -> None: ... - def get_isolation_level(self, connection): ... - def set_isolation_level(self, connection, level) -> None: ... - 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: Incomplete | None = None) -> None: ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... - def do_recover_twophase(self, connection) -> None: ... - -dialect = OracleDialect_cx_oracle diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/provision.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/__init__.pyi deleted file mode 100644 index 9a213981d86f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/__init__.pyi +++ /dev/null @@ -1,100 +0,0 @@ -import typing - -from .array import ARRAY as ARRAY, All as All, Any as Any, array as array -from .base import ( - BIGINT as BIGINT, - BIT as BIT, - BOOLEAN as BOOLEAN, - BYTEA as BYTEA, - CHAR as CHAR, - CIDR as CIDR, - DATE as DATE, - DOUBLE_PRECISION as DOUBLE_PRECISION, - ENUM as ENUM, - FLOAT as FLOAT, - INET as INET, - INTEGER as INTEGER, - INTERVAL as INTERVAL, - MACADDR as MACADDR, - MACADDR8 as MACADDR8, - MONEY as MONEY, - NUMERIC as NUMERIC, - OID as OID, - REAL as REAL, - REGCLASS as REGCLASS, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - TSVECTOR as TSVECTOR, - UUID as UUID, - VARCHAR as VARCHAR, - CreateEnumType as CreateEnumType, - DropEnumType as DropEnumType, -) -from .dml import Insert as Insert, insert as insert -from .ext import ExcludeConstraint as ExcludeConstraint, aggregate_order_by as aggregate_order_by, array_agg as array_agg -from .hstore import HSTORE as HSTORE, hstore as hstore -from .json import JSON as JSON, JSONB as JSONB -from .ranges import ( - DATERANGE as DATERANGE, - INT4RANGE as INT4RANGE, - INT8RANGE as INT8RANGE, - NUMRANGE as NUMRANGE, - TSRANGE as TSRANGE, - TSTZRANGE as TSTZRANGE, -) - -__all__ = ( - "INTEGER", - "BIGINT", - "SMALLINT", - "VARCHAR", - "CHAR", - "TEXT", - "NUMERIC", - "FLOAT", - "REAL", - "INET", - "CIDR", - "UUID", - "BIT", - "MACADDR", - "MACADDR8", - "MONEY", - "OID", - "REGCLASS", - "DOUBLE_PRECISION", - "TIMESTAMP", - "TIME", - "DATE", - "BYTEA", - "BOOLEAN", - "INTERVAL", - "ARRAY", - "ENUM", - "dialect", - "array", - "HSTORE", - "hstore", - "INT4RANGE", - "INT8RANGE", - "NUMRANGE", - "DATERANGE", - "TSVECTOR", - "TSRANGE", - "TSTZRANGE", - "JSON", - "JSONB", - "Any", - "All", - "DropEnumType", - "CreateEnumType", - "ExcludeConstraint", - "aggregate_order_by", - "array_agg", - "insert", - "Insert", -) - -dialect: typing.Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi deleted file mode 100644 index bfa94d1b135d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi +++ /dev/null @@ -1,41 +0,0 @@ -from _typeshed import Incomplete -from typing import Any as _Any - -from ...sql import expression, sqltypes - -def Any(other, arrexpr, operator=...): ... -def All(other, arrexpr, operator=...): ... - -class array(expression.ClauseList, expression.ColumnElement[_Any]): - __visit_name__: str - stringify_dialect: str - inherit_cache: bool - type: _Any - def __init__(self, clauses, **kw) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - -CONTAINS: _Any -CONTAINED_BY: _Any -OVERLAP: _Any - -class ARRAY(sqltypes.ARRAY): - class Comparator(sqltypes.ARRAY.Comparator[_Any]): - def contains(self, other, **kwargs): ... - def contained_by(self, other): ... - def overlap(self, other): ... - comparator_factory: _Any - item_type: _Any - as_tuple: _Any - dimensions: _Any - zero_indexes: _Any - def __init__( - self, item_type, as_tuple: bool = False, dimensions: Incomplete | None = None, zero_indexes: bool = False - ) -> None: ... - @property - def hashable(self): ... - @property - def python_type(self): ... - def compare_values(self, x, y): ... - def bind_expression(self, bindvalue): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi deleted file mode 100644 index cb20a7df1818..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi +++ /dev/null @@ -1,206 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import AdaptedConnection -from ...sql import sqltypes -from . import json -from .base import ENUM, INTERVAL, OID, REGCLASS, UUID, PGCompiler, PGDialect, PGExecutionContext, PGIdentifierPreparer - -class AsyncpgTime(sqltypes.Time): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgDate(sqltypes.Date): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgDateTime(sqltypes.DateTime): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgBoolean(sqltypes.Boolean): - def get_dbapi_type(self, dbapi): ... - -class AsyncPgInterval(INTERVAL): - def get_dbapi_type(self, dbapi): ... - @classmethod - def adapt_emulated_to_native(cls, interval, **kw): ... - -class AsyncPgEnum(ENUM): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgInteger(sqltypes.Integer): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgBigInteger(sqltypes.BigInteger): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgJSON(json.JSON): - def get_dbapi_type(self, dbapi): ... - def result_processor(self, dialect, coltype) -> None: ... - -class AsyncpgJSONB(json.JSONB): - def get_dbapi_type(self, dbapi): ... - def result_processor(self, dialect, coltype) -> None: ... - -class AsyncpgJSONIndexType(sqltypes.JSON.JSONIndexType): - def get_dbapi_type(self, dbapi) -> None: ... - -class AsyncpgJSONIntIndexType(sqltypes.JSON.JSONIntIndexType): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgJSONStrIndexType(sqltypes.JSON.JSONStrIndexType): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgJSONPathType(json.JSONPathType): - def bind_processor(self, dialect): ... - -class AsyncpgUUID(UUID): - def get_dbapi_type(self, dbapi): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class AsyncpgNumeric(sqltypes.Numeric): - def get_dbapi_type(self, dbapi): ... - def bind_processor(self, dialect) -> None: ... - def result_processor(self, dialect, coltype): ... - -class AsyncpgFloat(AsyncpgNumeric): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgREGCLASS(REGCLASS): - def get_dbapi_type(self, dbapi): ... - -class AsyncpgOID(OID): - def get_dbapi_type(self, dbapi): ... - -class PGExecutionContext_asyncpg(PGExecutionContext): - def handle_dbapi_exception(self, e) -> None: ... - exclude_set_input_sizes: Any - def pre_exec(self) -> None: ... - def create_server_side_cursor(self): ... - -class PGCompiler_asyncpg(PGCompiler): ... -class PGIdentifierPreparer_asyncpg(PGIdentifierPreparer): ... - -class AsyncAdapt_asyncpg_cursor: - server_side: bool - description: Any - arraysize: int - rowcount: int - def __init__(self, adapt_connection) -> None: ... - def close(self) -> None: ... - def execute(self, operation, parameters: Incomplete | None = None) -> None: ... - def executemany(self, operation, seq_of_parameters): ... - def setinputsizes(self, *inputsizes) -> None: ... - def __iter__(self): ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_asyncpg_ss_cursor(AsyncAdapt_asyncpg_cursor): - server_side: bool - def __init__(self, adapt_connection) -> None: ... - def close(self) -> None: ... - def __aiter__(self): ... - async def __anext__(self) -> None: ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - def executemany(self, operation, seq_of_parameters) -> None: ... - -class AsyncAdapt_asyncpg_connection(AdaptedConnection): - await_: Any - dbapi: Any - isolation_level: str - readonly: bool - deferrable: bool - def __init__(self, dbapi, connection, prepared_statement_cache_size: int = 100) -> None: ... - @property - def autocommit(self): ... - @autocommit.setter - def autocommit(self, value) -> None: ... - def set_isolation_level(self, level) -> None: ... - def cursor(self, server_side: bool = False): ... - def rollback(self) -> None: ... - def commit(self) -> None: ... - def close(self) -> None: ... - def terminate(self) -> None: ... - -class AsyncAdaptFallback_asyncpg_connection(AsyncAdapt_asyncpg_connection): - await_: Any - -class AsyncAdapt_asyncpg_dbapi: - asyncpg: Any - paramstyle: str - def __init__(self, asyncpg) -> None: ... - def connect(self, *arg, **kw): ... - - class Error(Exception): ... - class Warning(Exception): ... - class InterfaceError(Error): ... - class DatabaseError(Error): ... - class InternalError(DatabaseError): ... - class OperationalError(DatabaseError): ... - class ProgrammingError(DatabaseError): ... - class IntegrityError(DatabaseError): ... - class DataError(DatabaseError): ... - class NotSupportedError(DatabaseError): ... - class InternalServerError(InternalError): ... - - class InvalidCachedStatementError(NotSupportedError): - def __init__(self, message) -> None: ... - - def Binary(self, value): ... - STRING: Any - TIMESTAMP: Any - TIMESTAMP_W_TZ: Any - TIME: Any - TIME_W_TZ: Incomplete - DATE: Any - INTERVAL: Any - NUMBER: Any - FLOAT: Any - BOOLEAN: Any - INTEGER: Any - BIGINTEGER: Any - BYTES: Any - DECIMAL: Any - JSON: Any - JSONB: Any - ENUM: Any - UUID: Any - BYTEA: Any - DATETIME: Any - BINARY: Any - -class PGDialect_asyncpg(PGDialect): - driver: str - supports_statement_cache: bool - supports_unicode_statements: bool - supports_server_side_cursors: bool - supports_unicode_binds: bool - has_terminate: bool - default_paramstyle: str - supports_sane_multi_rowcount: bool - statement_compiler: Any - preparer: Any - use_setinputsizes: bool - use_native_uuid: bool - colspecs: Any - is_async: bool - @classmethod - def dbapi(cls): ... - def set_isolation_level(self, connection, level) -> None: ... - def set_readonly(self, connection, value) -> None: ... - def get_readonly(self, connection): ... - def set_deferrable(self, connection, value) -> None: ... - def get_deferrable(self, connection): ... - def create_connect_args(self, url): ... - @classmethod - def get_pool_class(cls, url): ... - def is_disconnect(self, e, connection, cursor): ... - def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... - async def setup_asyncpg_json_codec(self, conn): ... - async def setup_asyncpg_jsonb_codec(self, conn): ... - def on_connect(self): ... - def get_driver_connection(self, connection): ... - -dialect = PGDialect_asyncpg diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi deleted file mode 100644 index e90a536325c8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi +++ /dev/null @@ -1,314 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import characteristics, default, reflection -from ...schema import _CreateDropBase -from ...sql import compiler, elements, sqltypes -from ...sql.ddl import DDLBase -from ...sql.sqltypes import ( - BIGINT as BIGINT, - BOOLEAN as BOOLEAN, - CHAR as CHAR, - DATE as DATE, - FLOAT as FLOAT, - INTEGER as INTEGER, - NUMERIC as NUMERIC, - REAL as REAL, - SMALLINT as SMALLINT, - TEXT as TEXT, - VARCHAR as VARCHAR, -) - -IDX_USING: Any -AUTOCOMMIT_REGEXP: Any -RESERVED_WORDS: Any - -class BYTEA(sqltypes.LargeBinary): - __visit_name__: str - -class DOUBLE_PRECISION(sqltypes.Float): - __visit_name__: str - -class INET(sqltypes.TypeEngine): - __visit_name__: str - -PGInet = INET - -class CIDR(sqltypes.TypeEngine): - __visit_name__: str - -PGCidr = CIDR - -class MACADDR(sqltypes.TypeEngine): - __visit_name__: str - -PGMacAddr = MACADDR - -class MACADDR8(sqltypes.TypeEngine): - __visit_name__: str - -PGMacAddr8 = MACADDR8 - -class MONEY(sqltypes.TypeEngine): - __visit_name__: str - -class OID(sqltypes.TypeEngine): - __visit_name__: str - -class REGCLASS(sqltypes.TypeEngine): - __visit_name__: str - -class TIMESTAMP(sqltypes.TIMESTAMP): - precision: Any - def __init__(self, timezone: bool = False, precision: Incomplete | None = None) -> None: ... - -class TIME(sqltypes.TIME): - precision: Any - def __init__(self, timezone: bool = False, precision: Incomplete | None = None) -> None: ... - -class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval): - __visit_name__: str - native: bool - precision: Any - fields: Any - def __init__(self, precision: Incomplete | None = None, fields: Incomplete | None = None) -> None: ... - @classmethod - def adapt_emulated_to_native(cls, interval, **kw): ... - def as_generic(self, allow_nulltype: bool = False): ... - @property - def python_type(self): ... - def coerce_compared_value(self, op, value): ... - -PGInterval = INTERVAL - -class BIT(sqltypes.TypeEngine): - __visit_name__: str - length: Any - varying: Any - def __init__(self, length: Incomplete | None = None, varying: bool = False) -> None: ... - -PGBit = BIT - -class UUID(sqltypes.TypeEngine): - __visit_name__: str - as_uuid: Any - def __init__(self, as_uuid: bool = False) -> None: ... - def coerce_compared_value(self, op, value): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -PGUuid = UUID - -class TSVECTOR(sqltypes.TypeEngine): - __visit_name__: str - -class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum): # type: ignore[misc] # base classes incompatible - native_enum: bool - create_type: Any - def __init__(self, *enums, **kw) -> None: ... - @classmethod - def adapt_emulated_to_native(cls, impl, **kw): ... - def create(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... - def drop(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... - - class EnumGenerator(DDLBase): - checkfirst: Any - def __init__(self, dialect, connection, checkfirst: bool = False, **kwargs) -> None: ... - def visit_enum(self, enum) -> None: ... - - class EnumDropper(DDLBase): - checkfirst: Any - def __init__(self, dialect, connection, checkfirst: bool = False, **kwargs) -> None: ... - def visit_enum(self, enum) -> None: ... - -class _ColonCast(elements.Cast): - __visit_name__: str - type: Any - clause: Any - typeclause: Any - def __init__(self, expression, type_) -> None: ... - -colspecs: Any -ischema_names: Any - -class PGCompiler(compiler.SQLCompiler): - def visit_colon_cast(self, element, **kw): ... - def visit_array(self, element, **kw): ... - def visit_slice(self, element, **kw): ... - def visit_json_getitem_op_binary(self, binary, operator, _cast_applied: bool = False, **kw): ... - def visit_json_path_getitem_op_binary(self, binary, operator, _cast_applied: bool = False, **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_not_ilike_op_binary(self, binary, operator, **kw): ... - def visit_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_regexp_replace_op_binary(self, binary, operator, **kw): ... - def visit_empty_set_expr(self, element_types): ... - def render_literal_value(self, value, type_): ... - def visit_sequence(self, seq, **kw): ... - 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): ... - def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... - def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ... - def fetch_clause(self, select, **kw): ... - -class PGDDLCompiler(compiler.DDLCompiler): - def get_column_specification(self, column, **kwargs): ... - def visit_check_constraint(self, constraint): ... - def visit_foreign_key_constraint(self, constraint) -> str: ... # type: ignore[override] # Different params - def visit_drop_table_comment(self, drop): ... - 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): ... - def visit_computed_column(self, generated): ... - def visit_create_sequence(self, create, **kw): ... - -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_MACADDR8(self, type_, **kw): ... - def visit_MONEY(self, type_, **kw): ... - def visit_OID(self, type_, **kw): ... - def visit_REGCLASS(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_, identifier_preparer: Incomplete | None = None, **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: Any - def format_type(self, type_, use_schema: bool = True): ... - -class PGInspector(reflection.Inspector): - def get_table_oid(self, table_name, schema: Incomplete | None = None): ... - def get_enums(self, schema: Incomplete | None = None): ... - def get_foreign_table_names(self, schema: Incomplete | None = None): ... - def get_view_names(self, schema: Incomplete | None = None, include=("plain", "materialized")): ... - -class CreateEnumType(_CreateDropBase): - __visit_name__: str - -class DropEnumType(_CreateDropBase): - __visit_name__: str - -class PGExecutionContext(default.DefaultExecutionContext): - def fire_sequence(self, seq, type_): ... - def get_insert_default(self, column): ... - def should_autocommit_text(self, statement): ... - -class PGReadOnlyConnectionCharacteristic(characteristics.ConnectionCharacteristic): - transactional: bool - def reset_characteristic(self, dialect, dbapi_conn) -> None: ... - def set_characteristic(self, dialect, dbapi_conn, value) -> None: ... - def get_characteristic(self, dialect, dbapi_conn): ... - -class PGDeferrableConnectionCharacteristic(characteristics.ConnectionCharacteristic): - transactional: bool - def reset_characteristic(self, dialect, dbapi_conn) -> None: ... - def set_characteristic(self, dialect, dbapi_conn, value) -> None: ... - def get_characteristic(self, dialect, dbapi_conn): ... - -class PGDialect(default.DefaultDialect): - name: str - supports_statement_cache: bool - supports_alter: bool - max_identifier_length: int - supports_sane_rowcount: bool - supports_native_enum: bool - supports_native_boolean: bool - supports_smallserial: bool - supports_sequences: bool - sequences_optional: bool - preexecute_autoincrement_sequences: bool - postfetch_lastrowid: bool - supports_comments: bool - supports_default_values: bool - supports_default_metavalue: bool - supports_empty_insert: bool - supports_multivalues_insert: bool - supports_identity_columns: bool - default_paramstyle: str - ischema_names: Any - colspecs: Any - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - preparer: Any - inspector: Any - isolation_level: Any - implicit_returning: bool - full_returning: bool - connection_characteristics: Any - construct_arguments: Any - reflection_options: Any - def __init__( - self, - isolation_level: Incomplete | None = None, - json_serializer: Incomplete | None = None, - json_deserializer: Incomplete | None = None, - **kwargs, - ) -> None: ... - def initialize(self, connection) -> None: ... - def on_connect(self): ... - def set_isolation_level(self, connection, level) -> None: ... - def get_isolation_level(self, connection): ... - def set_readonly(self, connection, value) -> None: ... - def get_readonly(self, connection) -> None: ... - def set_deferrable(self, connection, value) -> None: ... - def get_deferrable(self, connection) -> None: ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_recover_twophase(self, connection): ... - def has_schema(self, connection, schema): ... - def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] - def has_type(self, connection, type_name, schema: Incomplete | None = None): ... - def get_table_oid(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = None, include=("plain", "materialized"), **kw): ... - def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys( - self, connection, table_name, schema: Incomplete | None = None, postgresql_ignore_search_path: bool = False, **kw - ): ... - def get_indexes(self, connection, table_name, schema, **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_table_comment(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi deleted file mode 100644 index 9d73ebd0499c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi +++ /dev/null @@ -1,56 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql.dml import Insert as StandardInsert -from ...sql.elements import ClauseElement -from ...util.langhelpers import memoized_property - -class Insert(StandardInsert): - stringify_dialect: str - inherit_cache: bool - @memoized_property - def excluded(self): ... - def on_conflict_do_update( - self, - constraint: Incomplete | None = None, - index_elements: Incomplete | None = None, - index_where: Incomplete | None = None, - set_: Incomplete | None = None, - where: Incomplete | None = None, - ) -> None: ... - def on_conflict_do_nothing( - self, - constraint: Incomplete | None = None, - index_elements: Incomplete | None = None, - index_where: Incomplete | None = None, - ) -> None: ... - -insert: Any - -class OnConflictClause(ClauseElement): - stringify_dialect: str - constraint_target: Any - inferred_target_elements: Any - inferred_target_whereclause: Any - def __init__( - self, - constraint: Incomplete | None = None, - index_elements: Incomplete | None = None, - index_where: Incomplete | None = None, - ) -> None: ... - -class OnConflictDoNothing(OnConflictClause): - __visit_name__: str - -class OnConflictDoUpdate(OnConflictClause): - __visit_name__: str - update_values_to_set: Any - update_whereclause: Any - def __init__( - self, - constraint: Incomplete | None = None, - index_elements: Incomplete | None = None, - index_where: Incomplete | None = None, - set_: Incomplete | None = None, - where: Incomplete | None = None, - ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi deleted file mode 100644 index 834e86264141..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import expression -from ...sql.schema import ColumnCollectionConstraint - -class aggregate_order_by(expression.ColumnElement[Any]): - __visit_name__: str - stringify_dialect: str - target: Any - type: Any - order_by: Any - def __init__(self, target, *order_by) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - def get_children(self, **kwargs): ... - -class ExcludeConstraint(ColumnCollectionConstraint): - __visit_name__: str - where: Any - inherit_cache: bool - create_drop_stringify_dialect: str - operators: Any - using: Any - ops: Any - def __init__(self, *elements, **kw) -> None: ... - -def array_agg(*arg, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi deleted file mode 100644 index 936c78c68ebe..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi +++ /dev/null @@ -1,67 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import functions as sqlfunc, sqltypes - -class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine): - __visit_name__: str - hashable: bool - text_type: Any - def __init__(self, text_type: Incomplete | None = None) -> None: ... - - class Comparator(sqltypes.Indexable.Comparator[Any], sqltypes.Concatenable.Comparator[Any]): - 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: Any - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class hstore(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreDefinedFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreDeleteFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreSliceFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreKeysFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreValsFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreArrayFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool - -class _HStoreMatrixFunction(sqlfunc.GenericFunction): - type: Any - name: str - inherit_cache: bool diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi deleted file mode 100644 index 0621b3e95953..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi +++ /dev/null @@ -1,28 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import sqltypes - -class JSONPathType(sqltypes.JSON.JSONPathType): - def bind_processor(self, dialect): ... - def literal_processor(self, dialect): ... - -class JSON(sqltypes.JSON): - astext_type: Any - def __init__(self, none_as_null: bool = False, astext_type: Incomplete | None = None) -> None: ... - - class Comparator(sqltypes.JSON.Comparator): - @property - def astext(self): ... - comparator_factory: Any - -class JSONB(JSON): - __visit_name__: 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: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi deleted file mode 100644 index 5d923063a0ec..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi +++ /dev/null @@ -1,134 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import sqltypes -from .array import ARRAY as PGARRAY -from .base import ENUM, INTERVAL, UUID, PGCompiler, PGDialect, PGExecutionContext, PGIdentifierPreparer -from .json import JSON, JSONB, JSONPathType - -class _PGNumeric(sqltypes.Numeric): - def result_processor(self, dialect, coltype): ... - -class _PGNumericNoBind(_PGNumeric): - def bind_processor(self, dialect) -> None: ... - -class _PGJSON(JSON): - def result_processor(self, dialect, coltype) -> None: ... - def get_dbapi_type(self, dbapi): ... - -class _PGJSONB(JSONB): - def result_processor(self, dialect, coltype) -> None: ... - def get_dbapi_type(self, dbapi): ... - -class _PGJSONIndexType(sqltypes.JSON.JSONIndexType): - def get_dbapi_type(self, dbapi) -> None: ... - -class _PGJSONIntIndexType(sqltypes.JSON.JSONIntIndexType): - def get_dbapi_type(self, dbapi): ... - -class _PGJSONStrIndexType(sqltypes.JSON.JSONStrIndexType): - def get_dbapi_type(self, dbapi): ... - -class _PGJSONPathType(JSONPathType): - def get_dbapi_type(self, dbapi): ... - -class _PGUUID(UUID): - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class _PGEnum(ENUM): - def get_dbapi_type(self, dbapi): ... - -class _PGInterval(INTERVAL): - def get_dbapi_type(self, dbapi): ... - @classmethod - def adapt_emulated_to_native(cls, interval, **kw): ... - -class _PGTimeStamp(sqltypes.DateTime): - def get_dbapi_type(self, dbapi): ... - -class _PGTime(sqltypes.Time): - def get_dbapi_type(self, dbapi): ... - -class _PGInteger(sqltypes.Integer): - def get_dbapi_type(self, dbapi): ... - -class _PGSmallInteger(sqltypes.SmallInteger): - def get_dbapi_type(self, dbapi): ... - -class _PGNullType(sqltypes.NullType): - def get_dbapi_type(self, dbapi): ... - -class _PGBigInteger(sqltypes.BigInteger): - def get_dbapi_type(self, dbapi): ... - -class _PGBoolean(sqltypes.Boolean): - def get_dbapi_type(self, dbapi): ... - -class _PGARRAY(PGARRAY): - def bind_expression(self, bindvalue): ... - -class PGExecutionContext_pg8000(PGExecutionContext): - def create_server_side_cursor(self): ... - def pre_exec(self) -> None: ... - -class ServerSideCursor: - server_side: bool - ident: Any - cursor: Any - def __init__(self, cursor, ident) -> None: ... - @property - def connection(self): ... - @property - def rowcount(self): ... - @property - def description(self): ... - def execute(self, operation, args=(), stream: Incomplete | None = None): ... - def executemany(self, operation, param_sets): ... - def fetchone(self): ... - def fetchmany(self, num: Incomplete | None = None): ... - def fetchall(self): ... - def close(self) -> None: ... - def setinputsizes(self, *sizes) -> None: ... - def setoutputsize(self, size, column: Incomplete | None = None) -> None: ... - -class PGCompiler_pg8000(PGCompiler): - def visit_mod_binary(self, binary, operator, **kw): ... - -class PGIdentifierPreparer_pg8000(PGIdentifierPreparer): - def __init__(self, *args, **kwargs) -> None: ... - -class PGDialect_pg8000(PGDialect): - driver: str - supports_statement_cache: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - default_paramstyle: str - supports_sane_multi_rowcount: bool - statement_compiler: Any - preparer: Any - supports_server_side_cursors: bool - use_setinputsizes: bool - description_encoding: Any - colspecs: Any - client_encoding: Any - def __init__(self, client_encoding: Incomplete | None = None, **kwargs) -> None: ... - @classmethod - def dbapi(cls): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - def set_isolation_level(self, connection, level) -> None: ... - def set_readonly(self, connection, value) -> None: ... - def get_readonly(self, connection): ... - def set_deferrable(self, connection, value) -> None: ... - def get_deferrable(self, connection): ... - def set_client_encoding(self, connection, client_encoding) -> None: ... - def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_recover_twophase(self, connection): ... - def on_connect(self): ... - -dialect = PGDialect_pg8000 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/provision.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi deleted file mode 100644 index d80b3f47112c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi +++ /dev/null @@ -1,95 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import sqltypes -from .array import ARRAY as PGARRAY -from .base import ENUM, UUID, PGCompiler, PGDialect, PGExecutionContext, PGIdentifierPreparer -from .hstore import HSTORE -from .json import JSON, JSONB - -logger: Any - -class _PGNumeric(sqltypes.Numeric): - def bind_processor(self, dialect) -> None: ... - def result_processor(self, dialect, coltype): ... - -class _PGEnum(ENUM): - def result_processor(self, dialect, coltype): ... - -class _PGHStore(HSTORE): - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class _PGARRAY(PGARRAY): - def bind_expression(self, bindvalue): ... - -class _PGJSON(JSON): - def result_processor(self, dialect, coltype) -> None: ... - -class _PGJSONB(JSONB): - def result_processor(self, dialect, coltype) -> None: ... - -class _PGUUID(UUID): - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class PGExecutionContext_psycopg2(PGExecutionContext): - def create_server_side_cursor(self): ... - cursor_fetch_strategy: Any - def post_exec(self) -> None: ... - -class PGCompiler_psycopg2(PGCompiler): ... -class PGIdentifierPreparer_psycopg2(PGIdentifierPreparer): ... - -EXECUTEMANY_PLAIN: Any -EXECUTEMANY_BATCH: Any -EXECUTEMANY_VALUES: Any -EXECUTEMANY_VALUES_PLUS_BATCH: Any - -class PGDialect_psycopg2(PGDialect): - driver: str - supports_statement_cache: bool - supports_unicode_statements: bool - supports_server_side_cursors: bool - default_paramstyle: str - supports_sane_multi_rowcount: bool - statement_compiler: Any - preparer: Any - psycopg2_version: Any - engine_config_types: Any - colspecs: Any - use_native_unicode: Any - use_native_hstore: Any - use_native_uuid: Any - supports_unicode_binds: Any - client_encoding: Any - executemany_mode: Any - insert_executemany_returning: bool - executemany_batch_page_size: Any - executemany_values_page_size: Any - def __init__( - self, - use_native_unicode: bool = True, - client_encoding: Incomplete | None = None, - use_native_hstore: bool = True, - use_native_uuid: bool = True, - executemany_mode: str = "values_only", - executemany_batch_page_size: int = 100, - executemany_values_page_size: int = 1000, - **kwargs, - ) -> None: ... - def initialize(self, connection) -> None: ... - @classmethod - def dbapi(cls): ... - def set_isolation_level(self, connection, level) -> None: ... - def set_readonly(self, connection, value) -> None: ... - def get_readonly(self, connection): ... - def set_deferrable(self, connection, value) -> None: ... - def get_deferrable(self, connection): ... - def do_ping(self, dbapi_connection): ... - def on_connect(self): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = PGDialect_psycopg2 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi deleted file mode 100644 index 4456b3294a70..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any - -from .psycopg2 import PGDialect_psycopg2 - -class PGDialect_psycopg2cffi(PGDialect_psycopg2): - driver: str - supports_unicode_statements: bool - supports_statement_cache: bool - FEATURE_VERSION_MAP: Any - @classmethod - def dbapi(cls): ... - -dialect = PGDialect_psycopg2cffi diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pygresql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pygresql.pyi deleted file mode 100644 index 997db14e8656..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pygresql.pyi +++ /dev/null @@ -1,52 +0,0 @@ -from typing import Any - -from ...sql.sqltypes import Numeric -from .base import UUID, PGCompiler, PGDialect, PGIdentifierPreparer -from .hstore import HSTORE -from .json import JSON, JSONB - -class _PGNumeric(Numeric): - def bind_processor(self, dialect) -> None: ... - 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: str - supports_statement_cache: bool - statement_compiler: Any - preparer: Any - @classmethod - def dbapi(cls): ... - colspecs: Any - dbapi_version: Any - supports_unicode_statements: bool - supports_unicode_binds: bool - has_native_hstore: Any - has_native_json: Any - has_native_uuid: Any - def __init__(self, **kwargs) -> None: ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = PGDialect_pygresql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pypostgresql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pypostgresql.pyi deleted file mode 100644 index 9623ce216e69..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pypostgresql.pyi +++ /dev/null @@ -1,30 +0,0 @@ -from typing import Any - -from ...sql import sqltypes -from ...util.langhelpers import memoized_property -from .base import PGDialect, 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: str - supports_statement_cache: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - description_encoding: Any - default_paramstyle: str - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - colspecs: Any - @classmethod - def dbapi(cls): ... - @memoized_property - def dbapi_exception_translation_map(self): ... - def create_connect_args(self, url): ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = PGDialect_pypostgresql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ranges.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ranges.pyi deleted file mode 100644 index d12715f46573..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ranges.pyi +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Any - -from ...sql import sqltypes - -class RangeOperators: - class comparator_factory(sqltypes.Concatenable.Comparator[Any]): - 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__: Any - def strictly_right_of(self, other): ... - __rshift__: 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__: str - -class INT8RANGE(RangeOperators, sqltypes.TypeEngine): - __visit_name__: str - -class NUMRANGE(RangeOperators, sqltypes.TypeEngine): - __visit_name__: str - -class DATERANGE(RangeOperators, sqltypes.TypeEngine): - __visit_name__: str - -class TSRANGE(RangeOperators, sqltypes.TypeEngine): - __visit_name__: str - -class TSTZRANGE(RangeOperators, sqltypes.TypeEngine): - __visit_name__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/__init__.pyi deleted file mode 100644 index 7dcb0cd7607e..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/__init__.pyi +++ /dev/null @@ -1,45 +0,0 @@ -from typing import Any - -from .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, - JSON as JSON, - NUMERIC as NUMERIC, - REAL as REAL, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - VARCHAR as VARCHAR, -) -from .dml import Insert as Insert, insert as insert - -__all__ = ( - "BLOB", - "BOOLEAN", - "CHAR", - "DATE", - "DATETIME", - "DECIMAL", - "FLOAT", - "INTEGER", - "JSON", - "NUMERIC", - "SMALLINT", - "TEXT", - "TIME", - "TIMESTAMP", - "VARCHAR", - "REAL", - "Insert", - "insert", - "dialect", -) - -dialect: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi deleted file mode 100644 index a4c15cb91385..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi +++ /dev/null @@ -1,73 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import AdaptedConnection -from .base import SQLiteExecutionContext -from .pysqlite import SQLiteDialect_pysqlite - -class AsyncAdapt_aiosqlite_cursor: - server_side: bool - await_: Any - arraysize: int - rowcount: int - description: Any - def __init__(self, adapt_connection) -> None: ... - def close(self) -> None: ... - lastrowid: int - def execute(self, operation, parameters: Incomplete | None = None) -> None: ... - def executemany(self, operation, seq_of_parameters) -> None: ... - def setinputsizes(self, *inputsizes) -> None: ... - def __iter__(self): ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_aiosqlite_ss_cursor(AsyncAdapt_aiosqlite_cursor): - server_side: bool - def __init__(self, *arg, **kw) -> None: ... - def close(self) -> None: ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def fetchall(self): ... - -class AsyncAdapt_aiosqlite_connection(AdaptedConnection): - await_: Any - dbapi: Any - def __init__(self, dbapi, connection) -> None: ... - @property - def isolation_level(self): ... - @isolation_level.setter - def isolation_level(self, value) -> None: ... - def create_function(self, *args, **kw) -> None: ... - def cursor(self, server_side: bool = False): ... - def execute(self, *args, **kw): ... - def rollback(self) -> None: ... - def commit(self) -> None: ... - def close(self) -> None: ... - -class AsyncAdaptFallback_aiosqlite_connection(AsyncAdapt_aiosqlite_connection): - await_: Any - -class AsyncAdapt_aiosqlite_dbapi: - aiosqlite: Any - sqlite: Any - paramstyle: str - def __init__(self, aiosqlite, sqlite) -> None: ... - def connect(self, *arg, **kw): ... - -class SQLiteExecutionContext_aiosqlite(SQLiteExecutionContext): - def create_server_side_cursor(self): ... - -class SQLiteDialect_aiosqlite(SQLiteDialect_pysqlite): - driver: str - supports_statement_cache: bool - is_async: bool - supports_server_side_cursors: bool - @classmethod - def dbapi(cls): ... - @classmethod - def get_pool_class(cls, url): ... - def is_disconnect(self, e, connection, cursor): ... - def get_driver_connection(self, connection): ... - -dialect = SQLiteDialect_aiosqlite diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi deleted file mode 100644 index 135442bab1a7..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi +++ /dev/null @@ -1,141 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import default -from ...sql import compiler, sqltypes -from ...sql.sqltypes import ( - BLOB as BLOB, - BOOLEAN as BOOLEAN, - CHAR as CHAR, - DECIMAL as DECIMAL, - FLOAT as FLOAT, - INTEGER as INTEGER, - NUMERIC as NUMERIC, - REAL as REAL, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIMESTAMP as TIMESTAMP, - VARCHAR as VARCHAR, -) -from .json import JSON as JSON - -class _SQliteJson(JSON): - def result_processor(self, dialect, coltype): ... - -class _DateTimeMixin: - def __init__(self, storage_format: Incomplete | None = None, regexp: Incomplete | None = None, **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: Any -ischema_names: Any - -class SQLiteCompiler(compiler.SQLCompiler): - extract_map: 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_is_not_distinct_from_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 visit_empty_set_op_expr(self, type_, expand_op): ... - def visit_empty_set_expr(self, element_types): ... - def visit_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_on_conflict_do_nothing(self, on_conflict, **kw): ... - def visit_on_conflict_do_update(self, on_conflict, **kw): ... - -class SQLiteDDLCompiler(compiler.DDLCompiler): - def get_column_specification(self, column, **kwargs): ... - def visit_primary_key_constraint(self, constraint): ... - def visit_unique_constraint(self, constraint): ... - def visit_check_constraint(self, constraint): ... - def visit_column_check_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 = False, include_table_schema: bool = True): ... # type: ignore[override] - def post_create_table(self, table): ... - -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): ... - def visit_JSON(self, type_, **kw): ... - -class SQLiteIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words: Any - -class SQLiteExecutionContext(default.DefaultExecutionContext): ... - -class SQLiteDialect(default.DefaultDialect): - name: str - supports_alter: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - supports_default_values: bool - supports_default_metavalue: bool - supports_empty_insert: bool - supports_cast: bool - supports_multivalues_insert: bool - tuple_in_values: bool - supports_statement_cache: bool - default_paramstyle: str - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - preparer: Any - ischema_names: Any - colspecs: Any - isolation_level: Any - construct_arguments: Any - native_datetime: Any - def __init__( - self, - isolation_level: Incomplete | None = None, - native_datetime: bool = False, - json_serializer: Incomplete | None = None, - json_deserializer: Incomplete | None = None, - _json_serializer: Incomplete | None = None, - _json_deserializer: Incomplete | None = None, - **kwargs, - ) -> None: ... - def set_isolation_level(self, connection, level) -> None: ... - def get_isolation_level(self, connection): ... - def on_connect(self): ... - def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = None, **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: Incomplete | None = None): ... # type: ignore[override] - def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi deleted file mode 100644 index 139c0f170a12..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi +++ /dev/null @@ -1,44 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql.dml import Insert as StandardInsert -from ...sql.elements import ClauseElement -from ...util.langhelpers import memoized_property - -class Insert(StandardInsert): - stringify_dialect: str - inherit_cache: bool - @memoized_property - def excluded(self): ... - def on_conflict_do_update( - self, - index_elements: Incomplete | None = None, - index_where: Incomplete | None = None, - set_: Incomplete | None = None, - where: Incomplete | None = None, - ) -> None: ... - def on_conflict_do_nothing(self, index_elements: Incomplete | None = None, index_where: Incomplete | None = None) -> None: ... - -insert: Any - -class OnConflictClause(ClauseElement): - stringify_dialect: str - constraint_target: Any - inferred_target_elements: Any - inferred_target_whereclause: Any - def __init__(self, index_elements: Incomplete | None = None, index_where: Incomplete | None = None) -> None: ... - -class OnConflictDoNothing(OnConflictClause): - __visit_name__: str - -class OnConflictDoUpdate(OnConflictClause): - __visit_name__: str - update_values_to_set: Any - update_whereclause: Any - def __init__( - self, - index_elements: Incomplete | None = None, - index_where: Incomplete | None = None, - set_: Incomplete | None = None, - where: Incomplete | None = None, - ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/json.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/json.pyi deleted file mode 100644 index 5d5bb5efe05d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/json.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from ...sql.sqltypes import JSON as _JSON - -class JSON(_JSON): ... - -class _FormatTypeMixin: - def bind_processor(self, dialect): ... - def literal_processor(self, dialect): ... - -class JSONIndexType(_FormatTypeMixin, _JSON.JSONIndexType): ... -class JSONPathType(_FormatTypeMixin, _JSON.JSONPathType): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/provision.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlcipher.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlcipher.pyi deleted file mode 100644 index cf2d8738ed15..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlcipher.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Any - -from .pysqlite import SQLiteDialect_pysqlite - -class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite): - driver: str - supports_statement_cache: bool - pragmas: Any - @classmethod - def dbapi(cls): ... - @classmethod - def get_pool_class(cls, url): ... - def on_connect_url(self, url): ... - def create_connect_args(self, url): ... - -dialect = SQLiteDialect_pysqlcipher diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlite.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlite.pyi deleted file mode 100644 index 5703abbdf573..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlite.pyi +++ /dev/null @@ -1,28 +0,0 @@ -from typing import Any - -from .base import DATE, DATETIME, SQLiteDialect - -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: str - supports_statement_cache: bool - colspecs: Any - description_encoding: Any - driver: str - @classmethod - def dbapi(cls): ... - @classmethod - def get_pool_class(cls, url): ... - 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 = SQLiteDialect_pysqlite diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/__init__.pyi deleted file mode 100644 index 3b97262f2a6a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/__init__.pyi +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any - -from .base import ( - BIGINT as BIGINT, - BINARY as BINARY, - BIT as BIT, - CHAR as CHAR, - DATE as DATE, - DATETIME as DATETIME, - FLOAT as FLOAT, - IMAGE as IMAGE, - INT as INT, - INTEGER as INTEGER, - MONEY as MONEY, - NCHAR as NCHAR, - NUMERIC as NUMERIC, - NVARCHAR as NVARCHAR, - SMALLINT as SMALLINT, - SMALLMONEY as SMALLMONEY, - TEXT as TEXT, - TIME as TIME, - TINYINT as TINYINT, - UNICHAR as UNICHAR, - UNITEXT as UNITEXT, - UNIVARCHAR as UNIVARCHAR, - VARBINARY as VARBINARY, - VARCHAR as VARCHAR, -) - -__all__ = ( - "CHAR", - "VARCHAR", - "TIME", - "NCHAR", - "NVARCHAR", - "TEXT", - "DATE", - "DATETIME", - "FLOAT", - "NUMERIC", - "BIGINT", - "INT", - "INTEGER", - "SMALLINT", - "BINARY", - "VARBINARY", - "UNITEXT", - "UNICHAR", - "UNIVARCHAR", - "IMAGE", - "BIT", - "MONEY", - "SMALLMONEY", - "TINYINT", - "dialect", -) - -dialect: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi deleted file mode 100644 index 52533ce99fd4..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi +++ /dev/null @@ -1,135 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...engine import default, reflection -from ...sql import compiler, sqltypes -from ...sql.sqltypes import ( - BIGINT as BIGINT, - BINARY as BINARY, - CHAR as CHAR, - DATE as DATE, - DATETIME as DATETIME, - DECIMAL as DECIMAL, - FLOAT as FLOAT, - INT as INT, - INTEGER as INTEGER, - NCHAR as NCHAR, - NUMERIC as NUMERIC, - NVARCHAR as NVARCHAR, - REAL as REAL, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - VARBINARY as VARBINARY, - VARCHAR as VARCHAR, - Unicode as Unicode, -) - -RESERVED_WORDS: Any - -class _SybaseUnitypeMixin: - def result_processor(self, dialect, coltype): ... - -class UNICHAR(_SybaseUnitypeMixin, sqltypes.Unicode): - __visit_name__: str - -class UNIVARCHAR(_SybaseUnitypeMixin, sqltypes.Unicode): - __visit_name__: str - -class UNITEXT(_SybaseUnitypeMixin, sqltypes.UnicodeText): - __visit_name__: str - -class TINYINT(sqltypes.Integer): - __visit_name__: str - -class BIT(sqltypes.TypeEngine): - __visit_name__: str - -class MONEY(sqltypes.TypeEngine): - __visit_name__: str - -class SMALLMONEY(sqltypes.TypeEngine): - __visit_name__: str - -class UNIQUEIDENTIFIER(sqltypes.TypeEngine): - __visit_name__: str - -class IMAGE(sqltypes.LargeBinary): - __visit_name__: 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: Any - -class SybaseInspector(reflection.Inspector): - def __init__(self, conn) -> None: ... - def get_table_id(self, table_name, schema: Incomplete | None = None): ... - -class SybaseExecutionContext(default.DefaultExecutionContext): - def set_ddl_autocommit(self, connection, value) -> None: ... - def pre_exec(self) -> None: ... - def post_exec(self) -> None: ... - def get_lastrowid(self): ... - -class SybaseSQLCompiler(compiler.SQLCompiler): - ansi_bind_rules: bool - extract_map: Any - 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): ... - def delete_table_clause(self, delete_stmt, from_table, extra_froms): ... - def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ... - -class SybaseDDLCompiler(compiler.DDLCompiler): - def get_column_specification(self, column, **kwargs): ... - def visit_drop_index(self, drop): ... - -class SybaseIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words: Any - -class SybaseDialect(default.DefaultDialect): - name: str - supports_unicode_statements: bool - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - supports_statement_cache: bool - supports_native_boolean: bool - supports_unicode_binds: bool - postfetch_lastrowid: bool - colspecs: Any - ischema_names: Any - type_compiler: Any - statement_compiler: Any - ddl_compiler: Any - preparer: Any - inspector: Any - construct_arguments: Any - def __init__(self, *args, **kwargs) -> None: ... - max_identifier_length: int - def initialize(self, connection) -> None: ... - def get_table_id(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... - def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... - def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/mxodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/mxodbc.pyi deleted file mode 100644 index 30ba517d28e5..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/mxodbc.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from ...connectors.mxodbc import MxODBCConnector -from .base import SybaseDialect, SybaseExecutionContext - -class SybaseExecutionContext_mxodbc(SybaseExecutionContext): ... - -class SybaseDialect_mxodbc(MxODBCConnector, SybaseDialect): - supports_statement_cache: bool - -dialect = SybaseDialect_mxodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi deleted file mode 100644 index 6678e90eaf8f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Any - -from ...connectors.pyodbc import PyODBCConnector -from ...sql import sqltypes -from .base import SybaseDialect, SybaseExecutionContext - -class _SybNumeric_pyodbc(sqltypes.Numeric): - def bind_processor(self, dialect): ... - -class SybaseExecutionContext_pyodbc(SybaseExecutionContext): - def set_ddl_autocommit(self, connection, value) -> None: ... - -class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect): - supports_statement_cache: bool - colspecs: Any - @classmethod - def dbapi(cls): ... - -dialect = SybaseDialect_pyodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi deleted file mode 100644 index c57e68804360..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi +++ /dev/null @@ -1,28 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...sql import sqltypes -from .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) -> None: ... - def pre_exec(self) -> None: ... - -class SybaseSQLCompiler_pysybase(SybaseSQLCompiler): - def bindparam_string(self, name, **kw): ... - -class SybaseDialect_pysybase(SybaseDialect): - driver: str - statement_compiler: Any - supports_statement_cache: bool - colspecs: Any - @classmethod - def dbapi(cls): ... - def create_connect_args(self, url): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def is_disconnect(self, e, connection, cursor): ... - -dialect = SybaseDialect_pysybase diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/__init__.pyi deleted file mode 100644 index 48d019b651ac..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/__init__.pyi +++ /dev/null @@ -1,46 +0,0 @@ -from ..sql import ddl as ddl -from . import events as events, util as util -from .base import ( - Connection as Connection, - Engine as Engine, - NestedTransaction as NestedTransaction, - RootTransaction as RootTransaction, - Transaction as Transaction, - TwoPhaseTransaction as TwoPhaseTransaction, -) -from .create import create_engine as create_engine, engine_from_config as engine_from_config -from .cursor import ( - BaseCursorResult as BaseCursorResult, - BufferedColumnResultProxy as BufferedColumnResultProxy, - BufferedColumnRow as BufferedColumnRow, - BufferedRowResultProxy as BufferedRowResultProxy, - CursorResult as CursorResult, - FullyBufferedResultProxy as FullyBufferedResultProxy, - LegacyCursorResult as LegacyCursorResult, - ResultProxy as ResultProxy, -) -from .interfaces import ( - AdaptedConnection as AdaptedConnection, - Compiled as Compiled, - Connectable as Connectable, - CreateEnginePlugin as CreateEnginePlugin, - Dialect as Dialect, - ExceptionContext as ExceptionContext, - ExecutionContext as ExecutionContext, - TypeCompiler as TypeCompiler, -) -from .mock import create_mock_engine as create_mock_engine -from .reflection import Inspector as Inspector -from .result import ( - ChunkedIteratorResult as ChunkedIteratorResult, - FrozenResult as FrozenResult, - IteratorResult as IteratorResult, - MappingResult as MappingResult, - MergedResult as MergedResult, - Result as Result, - ScalarResult as ScalarResult, - result_tuple as result_tuple, -) -from .row import BaseRow as BaseRow, LegacyRow as LegacyRow, Row as Row, RowMapping as RowMapping -from .url import URL as URL, make_url as make_url -from .util import connection_memoize as connection_memoize diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi deleted file mode 100644 index 2b69e99d3378..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi +++ /dev/null @@ -1,215 +0,0 @@ -from _typeshed import Incomplete -from _typeshed.dbapi import DBAPIConnection -from abc import abstractmethod -from collections.abc import Callable, Mapping -from types import TracebackType -from typing import Any, TypeVar, overload -from typing_extensions import Concatenate, ParamSpec, Self, TypeAlias - -from ..log import Identified, _EchoFlag, echo_property -from ..pool import Pool -from ..sql.compiler import Compiled -from ..sql.ddl import DDLElement -from ..sql.elements import ClauseElement -from ..sql.functions import FunctionElement -from ..sql.schema import DefaultGenerator -from .cursor import CursorResult -from .interfaces import Connectable as Connectable, Dialect, ExceptionContext -from .url import URL -from .util import TransactionalContext - -_T = TypeVar("_T") -_P = ParamSpec("_P") - -_Executable: TypeAlias = ClauseElement | FunctionElement | DDLElement | DefaultGenerator | Compiled - -class Connection(Connectable): - engine: Engine - dialect: Dialect - should_close_with_result: bool - dispatch: Any - def __init__( - self, - engine: Engine, - connection: DBAPIConnection | None = None, - close_with_result: bool = False, - _branch_from: Incomplete | None = None, - _execution_options: Incomplete | None = None, - _dispatch: Incomplete | None = None, - _has_events: Incomplete | None = None, - _allow_revalidate: bool = True, - ) -> None: ... - def schema_for_object(self, obj) -> str | None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - def execution_options(self, **opt): ... - def get_execution_options(self): ... - @property - def closed(self) -> bool: ... - @property - def invalidated(self) -> bool: ... - @property - def connection(self) -> DBAPIConnection: ... - def get_isolation_level(self): ... - @property - def default_isolation_level(self): ... - @property - def info(self): ... - def connect(self, close_with_result: bool = False): ... # type: ignore[override] - def invalidate(self, exception: Exception | None = None) -> None: ... - def detach(self) -> None: ... - def begin(self) -> Transaction: ... - def begin_nested(self) -> Transaction | None: ... - def begin_twophase(self, xid: Incomplete | None = None) -> TwoPhaseTransaction: ... - def recover_twophase(self): ... - def rollback_prepared(self, xid, recover: bool = False) -> None: ... - def commit_prepared(self, xid, recover: bool = False) -> None: ... - def in_transaction(self) -> bool: ... - def in_nested_transaction(self) -> bool: ... - def get_transaction(self) -> Transaction | None: ... - def get_nested_transaction(self) -> Transaction | None: ... - def close(self) -> None: ... - @overload - def scalar(self, object_: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> Any: ... - @overload - def scalar(self, object_: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> Any: ... - def scalars(self, object_, *multiparams, **params): ... - @overload # type: ignore[override] - def execute(self, statement: _Executable, *multiparams: Mapping[str, Any], **params) -> CursorResult: ... - @overload - def execute(self, statement: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params) -> CursorResult: ... - def exec_driver_sql( - self, statement: str, parameters: Incomplete | None = None, execution_options: Incomplete | None = None - ): ... - def transaction(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... - def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... - -class ExceptionContextImpl(ExceptionContext): - engine: Any - connection: Any - sqlalchemy_exception: Any - original_exception: Any - execution_context: Any - statement: Any - parameters: Any - is_disconnect: Any - invalidate_pool_on_disconnect: Any - def __init__( - self, - exception, - sqlalchemy_exception, - engine, - connection, - cursor, - statement, - parameters, - context, - is_disconnect, - invalidate_pool_on_disconnect, - ) -> None: ... - -class Transaction(TransactionalContext): - def __init__(self, connection: Connection) -> None: ... - @property - def is_valid(self) -> bool: ... - def close(self) -> None: ... - def rollback(self) -> None: ... - def commit(self) -> None: ... - # The following field are technically not defined on Transaction, but on - # all sub-classes. - @property - @abstractmethod - def connection(self) -> Connection: ... - @property - @abstractmethod - def is_active(self) -> bool: ... - -class MarkerTransaction(Transaction): - connection: Connection - @property - def is_active(self) -> bool: ... - -class RootTransaction(Transaction): - connection: Connection - is_active: bool - -class NestedTransaction(Transaction): - connection: Connection - is_active: bool - -class TwoPhaseTransaction(RootTransaction): - xid: Any - def __init__(self, connection: Connection, xid) -> None: ... - def prepare(self) -> None: ... - -class Engine(Connectable, Identified): - pool: Pool - url: URL - dialect: Dialect - logging_name: str # only exists if not None during initialization - echo: echo_property - hide_parameters: bool - def __init__( - self, - pool: Pool, - dialect: Dialect, - url: str | URL, - logging_name: str | None = None, - echo: _EchoFlag = None, - query_cache_size: int = 500, - execution_options: Mapping[str, Any] | None = None, - hide_parameters: bool = False, - ) -> None: ... - @property - def engine(self) -> Engine: ... - def clear_compiled_cache(self) -> None: ... - def update_execution_options(self, **opt) -> None: ... - def execution_options(self, **opt): ... - def get_execution_options(self): ... - @property - def name(self) -> str: ... - @property - def driver(self): ... - def dispose(self, close: bool = True) -> None: ... - - class _trans_ctx: - conn: Connection - transaction: Transaction - close_with_result: bool - def __init__(self, conn: Connection, transaction: Transaction, close_with_result: bool) -> None: ... - def __enter__(self) -> Connection: ... - def __exit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - - def begin(self, close_with_result: bool = False) -> _trans_ctx: ... - def transaction( - self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs - ) -> _T | None: ... - def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... - @overload # type: ignore[override] - def execute(self, statement: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> CursorResult: ... - @overload - def execute(self, statement: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> CursorResult: ... - @overload # type: ignore[override] - def scalar(self, statement: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> Any: ... - @overload - def scalar(self, statement: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> Any: ... - def connect(self, close_with_result: bool = False) -> Connection: ... # type: ignore[override] - def table_names(self, schema: Incomplete | None = None, connection: Connection | None = None): ... - def has_table(self, table_name: str, schema: Incomplete | None = None) -> bool: ... - def raw_connection(self, _connection: Connection | None = None) -> DBAPIConnection: ... - -class OptionEngineMixin: - url: URL - dialect: Dialect - logging_name: str - echo: bool - hide_parameters: bool - dispatch: Any - def __init__(self, proxied, execution_options) -> None: ... - pool: Pool - -class OptionEngine(OptionEngineMixin, Engine): ... # type: ignore[misc] diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/characteristics.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/characteristics.pyi deleted file mode 100644 index 2833b4fd6bfb..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/characteristics.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from abc import ABC, ABCMeta, abstractmethod - -class ConnectionCharacteristic(ABC, metaclass=ABCMeta): - transactional: bool - @abstractmethod - def reset_characteristic(self, dialect, dbapi_conn): ... - @abstractmethod - def set_characteristic(self, dialect, dbapi_conn, value): ... - @abstractmethod - def get_characteristic(self, dialect, dbapi_conn): ... - -class IsolationLevelCharacteristic(ConnectionCharacteristic): - transactional: bool - def reset_characteristic(self, dialect, dbapi_conn) -> None: ... - def set_characteristic(self, dialect, dbapi_conn, value) -> None: ... - def get_characteristic(self, dialect, dbapi_conn): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi deleted file mode 100644 index ae20f2002a80..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi +++ /dev/null @@ -1,22 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Mapping -from typing import Any, overload -from typing_extensions import Literal - -from ..future.engine import Engine as FutureEngine -from .base import Engine -from .mock import MockConnection -from .url import URL - -# Further kwargs are forwarded to the engine, dialect, or pool. -@overload -def create_engine(url: URL | str, *, strategy: Literal["mock"], **kwargs) -> MockConnection: ... # type: ignore[misc] -@overload -def create_engine( - url: URL | str, *, module: Incomplete | None = ..., enable_from_linting: bool = ..., future: Literal[True], **kwargs -) -> FutureEngine: ... -@overload -def create_engine( - url: URL | str, *, module: Incomplete | None = ..., enable_from_linting: bool = ..., future: Literal[False] = False, **kwargs -) -> Engine: ... -def engine_from_config(configuration: Mapping[str, Any], prefix: str = "sqlalchemy.", **kwargs) -> Engine: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi deleted file mode 100644 index c5e8f76fafc9..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi +++ /dev/null @@ -1,133 +0,0 @@ -from _typeshed import Incomplete -from abc import ABCMeta -from typing import Any - -from ..sql.compiler import RM_NAME as RM_NAME, RM_OBJECTS as RM_OBJECTS, RM_RENDERED_NAME as RM_RENDERED_NAME, RM_TYPE as RM_TYPE -from ..util.langhelpers import memoized_property -from .result import Result, ResultMetaData -from .row import LegacyRow - -MD_INDEX: int -MD_RESULT_MAP_INDEX: int -MD_OBJECTS: int -MD_LOOKUP_KEY: int -MD_RENDERED_NAME: int -MD_PROCESSOR: int -MD_UNTRANSLATED: int - -class CursorResultMetaData(ResultMetaData): - returns_rows: bool - case_sensitive: Any - def __init__(self, parent, cursor_description) -> None: ... - -class LegacyCursorResultMetaData(CursorResultMetaData): ... - -class ResultFetchStrategy: - alternate_cursor_description: Any - def soft_close(self, result, dbapi_cursor) -> None: ... - def hard_close(self, result, dbapi_cursor) -> None: ... - def yield_per(self, result, dbapi_cursor, num) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = False) -> None: ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None) -> None: ... - def fetchall(self, result) -> None: ... - def handle_exception(self, result, dbapi_cursor, err) -> None: ... - -class NoCursorFetchStrategy(ResultFetchStrategy): - def soft_close(self, result, dbapi_cursor) -> None: ... - def hard_close(self, result, dbapi_cursor) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... - def fetchall(self, result, dbapi_cursor): ... - -class NoCursorDQLFetchStrategy(NoCursorFetchStrategy): ... -class NoCursorDMLFetchStrategy(NoCursorFetchStrategy): ... - -class CursorFetchStrategy(ResultFetchStrategy): - def soft_close(self, result, dbapi_cursor) -> None: ... - def hard_close(self, result, dbapi_cursor) -> None: ... - def handle_exception(self, result, dbapi_cursor, err) -> None: ... - def yield_per(self, result, dbapi_cursor, num) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... - def fetchall(self, result, dbapi_cursor): ... - -class BufferedRowCursorFetchStrategy(CursorFetchStrategy): - def __init__( - self, dbapi_cursor, execution_options, growth_factor: int = 5, initial_buffer: Incomplete | None = None - ) -> None: ... - @classmethod - def create(cls, result): ... - def yield_per(self, result, dbapi_cursor, num) -> None: ... - def soft_close(self, result, dbapi_cursor) -> None: ... - def hard_close(self, result, dbapi_cursor) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... - def fetchall(self, result, dbapi_cursor): ... - -class FullyBufferedCursorFetchStrategy(CursorFetchStrategy): - alternate_cursor_description: Any - def __init__( - self, dbapi_cursor, alternate_description: Incomplete | None = None, initial_buffer: Incomplete | None = None - ) -> None: ... - def yield_per(self, result, dbapi_cursor, num) -> None: ... - def soft_close(self, result, dbapi_cursor) -> None: ... - def hard_close(self, result, dbapi_cursor) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... - def fetchall(self, result, dbapi_cursor): ... - -class _NoResultMetaData(ResultMetaData): - returns_rows: bool - @property - def keys(self) -> None: ... - -class _LegacyNoResultMetaData(_NoResultMetaData): - @property - def keys(self): ... - -class BaseCursorResult: - out_parameters: Any - closed: bool - context: Any - dialect: Any - cursor: Any - cursor_strategy: Any - connection: Any - def __init__(self, context, cursor_strategy, cursor_description): ... - @property - def inserted_primary_key_rows(self): ... - @property - def inserted_primary_key(self): ... - def last_updated_params(self): ... - def last_inserted_params(self): ... - @property - def returned_defaults_rows(self): ... - @property - def returned_defaults(self): ... - def lastrow_has_defaults(self): ... - def postfetch_cols(self): ... - def prefetch_cols(self): ... - def supports_sane_rowcount(self): ... - def supports_sane_multi_rowcount(self): ... - @memoized_property - def rowcount(self): ... - @property - def lastrowid(self): ... - @property - def returns_rows(self): ... - @property - def is_insert(self): ... - -class CursorResult(BaseCursorResult, Result): - def merge(self, *others): ... - def close(self) -> None: ... - -class LegacyCursorResult(CursorResult): - def close(self) -> None: ... - -ResultProxy = LegacyCursorResult - -class BufferedRowResultProxy(ResultProxy): ... -class FullyBufferedResultProxy(ResultProxy): ... -class BufferedColumnRow(LegacyRow, metaclass=ABCMeta): ... -class BufferedColumnResultProxy(ResultProxy): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi deleted file mode 100644 index 2bfb752ef92e..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi +++ /dev/null @@ -1,222 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, ClassVar - -from ..sql import sqltypes -from ..util.langhelpers import memoized_property -from . import interfaces - -AUTOCOMMIT_REGEXP: Any -SERVER_SIDE_CURSOR_RE: Any -CACHE_HIT: Any -CACHE_MISS: Any -CACHING_DISABLED: Any -NO_CACHE_KEY: Any -NO_DIALECT_SUPPORT: Any - -class DefaultDialect(interfaces.Dialect): # type: ignore[misc] - execution_ctx_cls: ClassVar[type[interfaces.ExecutionContext]] - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - preparer: Any - supports_alter: bool - supports_comments: bool - inline_comments: bool - use_setinputsizes: bool - supports_statement_cache: bool - default_sequence_base: int - execute_sequence_format: Any - supports_schemas: bool - supports_views: bool - supports_sequences: bool - sequences_optional: bool - preexecute_autoincrement_sequences: bool - supports_identity_columns: bool - postfetch_lastrowid: bool - implicit_returning: bool - full_returning: bool - insert_executemany_returning: bool - cte_follows_insert: bool - supports_native_enum: bool - supports_native_boolean: bool - non_native_boolean_check_constraint: bool - supports_simple_order_by_label: bool - tuple_in_values: bool - connection_characteristics: Any - engine_config_types: Any - supports_native_decimal: bool - supports_unicode_statements: bool - supports_unicode_binds: bool - returns_unicode_strings: Any - description_encoding: Any - name: str - max_identifier_length: int - isolation_level: Any - max_index_name_length: Any - max_constraint_name_length: Any - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - colspecs: Any - default_paramstyle: str - supports_default_values: bool - supports_default_metavalue: bool - supports_empty_insert: bool - supports_multivalues_insert: bool - supports_is_distinct_from: bool - supports_server_side_cursors: bool - server_side_cursors: bool - supports_for_update_of: bool - server_version_info: Any - default_schema_name: Any - construct_arguments: Any - requires_name_normalize: bool - reflection_options: Any - dbapi_exception_translation_map: Any - is_async: bool - CACHE_HIT: Any - CACHE_MISS: Any - CACHING_DISABLED: Any - NO_CACHE_KEY: Any - NO_DIALECT_SUPPORT: Any - has_terminate: bool - convert_unicode: Any - encoding: Any - positional: bool - dbapi: Any - paramstyle: Any - identifier_preparer: Any - case_sensitive: Any - label_length: Any - compiler_linting: Any - def __init__( - self, - convert_unicode: bool = False, - encoding: str = "utf-8", - paramstyle: Incomplete | None = None, - dbapi: Incomplete | None = None, - implicit_returning: Incomplete | None = None, - case_sensitive: bool = True, - supports_native_boolean: Incomplete | None = None, - max_identifier_length: Incomplete | None = None, - label_length: Incomplete | None = None, - compiler_linting=0, - server_side_cursors: bool = False, - **kwargs, - ) -> None: ... - @property - def dialect_description(self): ... - @property - def supports_sane_rowcount_returning(self): ... - @classmethod - def get_pool_class(cls, url): ... - def get_dialect_pool_class(self, url): ... - @classmethod - def load_provisioning(cls) -> None: ... - default_isolation_level: Any - def initialize(self, connection) -> None: ... - def on_connect(self) -> None: ... - def get_default_isolation_level(self, dbapi_conn): ... - def type_descriptor(self, typeobj): ... - def has_index(self, connection, table_name, index_name, schema: Incomplete | None = None): ... - def validate_identifier(self, ident) -> None: ... - def connect(self, *cargs, **cparams): ... - def create_connect_args(self, url): ... - def set_engine_execution_options(self, engine, opts) -> None: ... - def set_connection_execution_options(self, connection, opts) -> None: ... - def do_begin(self, dbapi_connection) -> None: ... - def do_rollback(self, dbapi_connection) -> None: ... - def do_commit(self, dbapi_connection) -> None: ... - def do_close(self, dbapi_connection) -> None: ... - def do_ping(self, dbapi_connection): ... - def create_xid(self): ... - def do_savepoint(self, connection, name) -> None: ... - def do_rollback_to_savepoint(self, connection, name) -> None: ... - def do_release_savepoint(self, connection, name) -> None: ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def do_execute_no_params(self, cursor, statement, context: Incomplete | None = None) -> None: ... # type: ignore[override] - def is_disconnect(self, e, connection, cursor): ... - def reset_isolation_level(self, dbapi_conn) -> None: ... - def normalize_name(self, name): ... - def denormalize_name(self, name): ... - def get_driver_connection(self, connection): ... - -class _RendersLiteral: - def literal_processor(self, dialect): ... - -class _StrDateTime(_RendersLiteral, sqltypes.DateTime): ... -class _StrDate(_RendersLiteral, sqltypes.Date): ... -class _StrTime(_RendersLiteral, sqltypes.Time): ... - -class StrCompileDialect(DefaultDialect): # type: ignore[misc] - statement_compiler: Any - ddl_compiler: Any - type_compiler: Any - preparer: Any - supports_statement_cache: bool - supports_identity_columns: bool - supports_sequences: bool - sequences_optional: bool - preexecute_autoincrement_sequences: bool - implicit_returning: bool - supports_native_boolean: bool - supports_multivalues_insert: bool - supports_simple_order_by_label: bool - colspecs: Any - -class DefaultExecutionContext(interfaces.ExecutionContext): - isinsert: bool - isupdate: bool - isdelete: bool - is_crud: bool - is_text: bool - isddl: bool - executemany: bool - compiled: Any - statement: Any - result_column_struct: Any - returned_default_rows: Any - execution_options: Any - include_set_input_sizes: Any - exclude_set_input_sizes: Any - cursor_fetch_strategy: Any - cache_stats: Any - invoked_statement: Any - cache_hit: Any - @memoized_property - def identifier_preparer(self): ... - @memoized_property - def engine(self): ... - @memoized_property - def postfetch_cols(self): ... - @memoized_property - def prefetch_cols(self): ... - @memoized_property - def returning_cols(self) -> None: ... - @memoized_property - def no_parameters(self): ... - @memoized_property - def should_autocommit(self): ... - @property - def connection(self): ... - def should_autocommit_text(self, statement): ... - def create_cursor(self): ... - def create_default_cursor(self): ... - def create_server_side_cursor(self) -> None: ... - def pre_exec(self) -> None: ... - def get_out_parameter_values(self, names) -> None: ... - def post_exec(self) -> None: ... - def get_result_processor(self, type_, colname, coltype): ... - def get_lastrowid(self): ... - def handle_dbapi_exception(self, e) -> None: ... - @property - def rowcount(self): ... - def supports_sane_rowcount(self): ... - def supports_sane_multi_rowcount(self): ... - @memoized_property - def inserted_primary_key_rows(self): ... - def lastrow_has_defaults(self): ... - current_parameters: Any - def get_current_parameters(self, isolate_multiinsert_groups: bool = True): ... - def get_insert_default(self, column): ... - def get_update_default(self, column): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/events.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/events.pyi deleted file mode 100644 index 7cca8b27ce2b..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/events.pyi +++ /dev/null @@ -1,29 +0,0 @@ -from .. import event as event - -class ConnectionEvents(event.Events): - def before_execute(self, conn, clauseelement, multiparams, params, execution_options) -> None: ... - def after_execute(self, conn, clauseelement, multiparams, params, execution_options, result) -> None: ... - def before_cursor_execute(self, conn, cursor, statement, parameters, context, executemany) -> None: ... - def after_cursor_execute(self, conn, cursor, statement, parameters, context, executemany) -> None: ... - def handle_error(self, exception_context) -> None: ... - def engine_connect(self, conn, branch) -> None: ... - def set_connection_execution_options(self, conn, opts) -> None: ... - def set_engine_execution_options(self, engine, opts) -> None: ... - def engine_disposed(self, engine) -> None: ... - def begin(self, conn) -> None: ... - def rollback(self, conn) -> None: ... - def commit(self, conn) -> None: ... - def savepoint(self, conn, name) -> None: ... - def rollback_savepoint(self, conn, name, context) -> None: ... - def release_savepoint(self, conn, name, context) -> None: ... - def begin_twophase(self, conn, xid) -> None: ... - def prepare_twophase(self, conn, xid) -> None: ... - def rollback_twophase(self, conn, xid, is_prepared) -> None: ... - def commit_twophase(self, conn, xid, is_prepared) -> None: ... - -class DialectEvents(event.Events): - def do_connect(self, dialect, conn_rec, cargs, cparams) -> None: ... - def do_executemany(self, cursor, statement, parameters, context) -> None: ... - def do_execute_no_params(self, cursor, statement, context) -> None: ... - def do_execute(self, cursor, statement, parameters, context) -> None: ... - def do_setinputsizes(self, inputsizes, cursor, statement, parameters, context) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi deleted file mode 100644 index 714002b31458..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi +++ /dev/null @@ -1,170 +0,0 @@ -from _typeshed import Incomplete -from _typeshed.dbapi import DBAPIConnection, DBAPICursor -from abc import abstractmethod -from collections.abc import Callable, Collection, Mapping -from typing import Any, ClassVar, overload - -from ..exc import StatementError -from ..sql.compiler import Compiled as Compiled, IdentifierPreparer, TypeCompiler as TypeCompiler -from ..sql.ddl import DDLElement -from ..sql.elements import ClauseElement -from ..sql.functions import FunctionElement -from ..sql.schema import DefaultGenerator -from .base import Connection, Engine -from .cursor import CursorResult -from .url import URL - -class Dialect: - # Sub-classes are required to have the following attributes: - name: str - driver: str - positional: bool - paramstyle: str - encoding: str - statement_compiler: Compiled - ddl_compiler: Compiled - server_version_info: tuple[Any, ...] - # Only available on supporting dialects: - # default_schema_name: str - execution_ctx_cls: ClassVar[type[ExecutionContext]] - execute_sequence_format: type[tuple[Any] | list[Any]] - preparer: IdentifierPreparer - supports_alter: bool - max_identifier_length: int - supports_sane_rowcount: bool - supports_sane_multi_rowcount: bool - preexecute_autoincrement_sequences: bool - implicit_returning: bool - colspecs: dict[Any, Any] - supports_default_values: bool - supports_sequences: bool - sequences_optional: bool - supports_native_enum: bool - supports_native_boolean: bool - dbapi_exception_translation_map: dict[Any, Any] - supports_statement_cache: bool - dispatch: Incomplete - @abstractmethod - def create_connect_args(self, url: URL) -> None: ... - def initialize(self, connection) -> None: ... - def on_connect_url(self, url) -> Callable[[DBAPIConnection], object] | None: ... - def on_connect(self) -> Callable[[DBAPIConnection], object] | None: ... - # The following methods all raise NotImplementedError, but not all - # dialects implement all methods, which is why they can't be marked - # as abstract. - @classmethod - def type_descriptor(cls, typeobj) -> None: ... - def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_table_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... - def get_temp_table_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... - def get_view_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... - def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... - def get_temp_view_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def get_table_comment(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def normalize_name(self, name) -> None: ... - def denormalize_name(self, name) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... - def has_index(self, connection, table_name, index_name, schema: Incomplete | None = None) -> None: ... - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None, **kw) -> None: ... - def do_begin(self, dbapi_connection) -> None: ... - def do_rollback(self, dbapi_connection) -> None: ... - def do_commit(self, dbapi_connection) -> None: ... - def do_terminate(self, dbapi_connection) -> None: ... - def do_close(self, dbapi_connection) -> None: ... - def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... - def create_xid(self) -> None: ... - def do_savepoint(self, connection, name) -> None: ... - def do_rollback_to_savepoint(self, connection, name) -> None: ... - def do_release_savepoint(self, connection, name) -> None: ... - def do_begin_twophase(self, connection, xid) -> None: ... - def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... - def do_recover_twophase(self, connection) -> None: ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def do_execute_no_params(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... - def is_disconnect(self, e, connection, cursor) -> None: ... - def connect(self, *cargs, **cparams) -> DBAPIConnection: ... - def reset_isolation_level(self, dbapi_conn) -> None: ... - def set_isolation_level(self, dbapi_conn, level) -> None: ... - def get_isolation_level(self, dbapi_conn) -> None: ... - def get_default_isolation_level(self, dbapi_conn) -> None: ... - @classmethod - def get_dialect_cls(cls, url): ... - @classmethod - def load_provisioning(cls) -> None: ... - @classmethod - def engine_created(cls, engine) -> None: ... - def get_driver_connection(self, connection) -> None: ... - -class CreateEnginePlugin: - url: URL - def __init__(self, url: URL, kwargs) -> None: ... - def update_url(self, url) -> None: ... - def handle_dialect_kwargs(self, dialect_cls, dialect_args) -> None: ... - def handle_pool_kwargs(self, pool_cls, pool_args) -> None: ... - def engine_created(self, engine) -> None: ... - -class ExecutionContext: - def create_cursor(self) -> None: ... - def pre_exec(self) -> None: ... - def get_out_parameter_values(self, out_param_names) -> None: ... - def post_exec(self) -> None: ... - def handle_dbapi_exception(self, e) -> None: ... - def should_autocommit_text(self, statement) -> None: ... - def lastrow_has_defaults(self) -> None: ... - def get_rowcount(self) -> None: ... - -class Connectable: - dispatch: Incomplete - @abstractmethod - def connect(self, **kwargs) -> Connection: ... - @property - def engine(self) -> Engine | None: ... - @abstractmethod - @overload - def execute( - self, - object_: ClauseElement | FunctionElement | DDLElement | DefaultGenerator | Compiled, - *multiparams: Mapping[str, Any], - **params: Any, - ) -> CursorResult: ... - @abstractmethod - @overload - def execute(self, object_: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> CursorResult: ... - @abstractmethod - @overload - def scalar( - self, - object_: ClauseElement | FunctionElement | DDLElement | DefaultGenerator | Compiled, - *multiparams: Mapping[str, Any], - **params: Any, - ) -> Any: ... - @abstractmethod - @overload - def scalar(self, object_: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> Any: ... - -class ExceptionContext: - connection: Connection | None - engine: Engine | None - cursor: DBAPICursor | None - statement: str | None - parameters: Collection[Any] | None - original_exception: BaseException | None - sqlalchemy_exception: StatementError | None - chained_exception: BaseException | None - execution_context: ExecutionContext | None - is_disconnect: bool | None - invalidate_pool_on_disconnect: bool - -class AdaptedConnection: - @property - def driver_connection(self): ... - def run_async(self, fn): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi deleted file mode 100644 index bfd8007258db..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi +++ /dev/null @@ -1,32 +0,0 @@ -from abc import abstractmethod -from collections.abc import Mapping -from typing import Any, overload -from typing_extensions import Self - -from .base import _Executable -from .cursor import CursorResult -from .interfaces import Connectable, Dialect -from .url import URL - -class MockConnection(Connectable): - def __init__(self, dialect: Dialect, execute) -> None: ... - @property - def engine(self) -> Self: ... # type: ignore[override] - @property - def dialect(self) -> Dialect: ... - @property - def name(self) -> str: ... - def schema_for_object(self, obj): ... - def connect(self, **kwargs): ... - def execution_options(self, **kw): ... - def compiler(self, statement, parameters, **kwargs): ... - def create(self, entity, **kwargs) -> None: ... - def drop(self, entity, **kwargs) -> None: ... - @abstractmethod - @overload - def execute(self, object_: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> CursorResult: ... - @abstractmethod - @overload - def execute(self, object_: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> CursorResult: ... - -def create_mock_engine(url: URL | str, executor, **kw) -> MockConnection: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi deleted file mode 100644 index 242cf7868d78..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi +++ /dev/null @@ -1,32 +0,0 @@ -from _typeshed import Incomplete - -def cache(fn, self, con, *args, **kw): ... - -class Inspector: - def __init__(self, bind): ... - @classmethod - def from_engine(cls, bind): ... - @property - def default_schema_name(self): ... - def get_schema_names(self): ... - def get_table_names(self, schema: Incomplete | None = None): ... - def has_table(self, table_name, schema: Incomplete | None = None): ... - def has_sequence(self, sequence_name, schema: Incomplete | None = None): ... - def get_sorted_table_and_fkc_names(self, schema: Incomplete | None = None): ... - def get_temp_table_names(self): ... - def get_temp_view_names(self): ... - def get_table_options(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_view_names(self, schema: Incomplete | None = None): ... - def get_sequence_names(self, schema: Incomplete | None = None): ... - def get_view_definition(self, view_name, schema: Incomplete | None = None): ... - def get_columns(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_pk_constraint(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_foreign_keys(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_indexes(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_unique_constraints(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_table_comment(self, table_name, schema: Incomplete | None = None, **kw): ... - def get_check_constraints(self, table_name, schema: Incomplete | None = None, **kw): ... - def reflecttable(self, *args, **kwargs): ... - def reflect_table( - self, table, include_columns, exclude_columns=(), resolve_fks: bool = True, _extend_on: Incomplete | None = None - ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi deleted file mode 100644 index e684e8ba61ff..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi +++ /dev/null @@ -1,134 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Generator, KeysView -from typing import Any -from typing_extensions import Self - -from ..sql.base import InPlaceGenerative -from .row import Row - -class ResultMetaData: - @property - def keys(self): ... - -class RMKeyView(KeysView[Any]): - def __init__(self, parent) -> None: ... - def __len__(self) -> int: ... - def __iter__(self): ... - def __contains__(self, item): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class SimpleResultMetaData(ResultMetaData): - def __init__( - self, - keys, - extra: Incomplete | None = None, - _processors: Incomplete | None = None, - _tuplefilter: Incomplete | None = None, - _translated_indexes: Incomplete | None = None, - _unique_filters: Incomplete | None = None, - ) -> None: ... - -def result_tuple(fields, extra: Incomplete | None = None): ... - -class ResultInternal(InPlaceGenerative): ... - -class _WithKeys: - def keys(self): ... - -class Result(_WithKeys, ResultInternal): - def __init__(self, cursor_metadata) -> None: ... - def close(self) -> None: ... - @property - def closed(self): ... - def yield_per(self, num: int) -> Self: ... - def unique(self, strategy: Incomplete | None = None) -> Self: ... - def columns(self, *col_expressions): ... - def scalars(self, index: int = 0) -> ScalarResult: ... - def mappings(self) -> MappingResult: ... - def __iter__(self): ... - def __next__(self): ... - def partitions(self, size: int | None = None) -> Generator[list[Row], None, None]: ... - def fetchall(self) -> list[Row]: ... - def fetchone(self) -> Row | None: ... - def fetchmany(self, size: int | None = None) -> list[Row]: ... - def all(self) -> list[Row]: ... - def first(self) -> Row | None: ... - def one_or_none(self) -> Row | None: ... - def scalar_one(self) -> Any: ... - def scalar_one_or_none(self) -> Any | None: ... - def one(self) -> Row: ... - def scalar(self) -> Any | None: ... - def freeze(self) -> FrozenResult: ... - def merge(self, *others) -> MergedResult: ... - -class FilterResult(ResultInternal): - def yield_per(self: Self, num) -> Self: ... - @property - def closed(self): ... - def close(self) -> None: ... - -class ScalarResult(FilterResult): - def __init__(self, real_result, index) -> None: ... - def unique(self, strategy: Incomplete | None = None): ... - def partitions(self, size: Incomplete | None = None) -> None: ... - def fetchall(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def all(self): ... - def __iter__(self): ... - def __next__(self): ... - def first(self): ... - def one_or_none(self): ... - def one(self): ... - -class MappingResult(_WithKeys, FilterResult): - def __init__(self, result) -> None: ... - def unique(self, strategy: Incomplete | None = None): ... - def columns(self, *col_expressions): ... - def partitions(self, size: Incomplete | None = None) -> None: ... - def fetchall(self): ... - def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = None): ... - def all(self): ... - def __iter__(self): ... - def __next__(self): ... - def first(self): ... - def one_or_none(self): ... - def one(self): ... - -class FrozenResult: - metadata: Any - data: Any - def __init__(self, result) -> None: ... - def rewrite_rows(self): ... - def with_new_rows(self, tuple_data): ... - def __call__(self): ... - -class IteratorResult(Result): - iterator: Any - raw: Any - def __init__( - self, cursor_metadata, iterator, raw: Incomplete | None = None, _source_supports_scalars: bool = False - ) -> None: ... - @property - def closed(self): ... - -def null_result() -> IteratorResult: ... - -class ChunkedIteratorResult(IteratorResult): - chunks: Any - raw: Any - iterator: Any - dynamic_yield_per: Any - def __init__( - self, - cursor_metadata, - chunks, - source_supports_scalars: bool = False, - raw: Incomplete | None = None, - dynamic_yield_per: bool = False, - ) -> None: ... - -class MergedResult(IteratorResult): - closed: bool - def __init__(self, cursor_metadata, results) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi deleted file mode 100644 index ccc6f336e61f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi +++ /dev/null @@ -1,63 +0,0 @@ -from abc import ABCMeta -from collections.abc import ItemsView, Iterator, KeysView, Mapping, Sequence, ValuesView -from typing import Any, Generic, TypeVar - -from ..cresultproxy import BaseRow as BaseRow - -_VT_co = TypeVar("_VT_co", covariant=True) - -MD_INDEX: int - -def rowproxy_reconstructor(cls, state): ... - -KEY_INTEGER_ONLY: int -KEY_OBJECTS_ONLY: int -KEY_OBJECTS_BUT_WARN: int -KEY_OBJECTS_NO_WARN: int - -class Row(BaseRow, Sequence[Any], metaclass=ABCMeta): - # The count and index methods are inherited from Sequence. - # If the result set contains columns with the same names, these - # fields contains their respective values, instead. We don't reflect - # this in the stubs. - __hash__ = BaseRow.__hash__ # type: ignore[assignment] - def __lt__(self, other: Row | tuple[Any, ...]) -> bool: ... - def __le__(self, other: Row | tuple[Any, ...]) -> bool: ... - def __ge__(self, other: Row | tuple[Any, ...]) -> bool: ... - def __gt__(self, other: Row | tuple[Any, ...]) -> bool: ... - def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... - def keys(self) -> list[str]: ... - def __contains__(self, key): ... - # The following methods are public, but have a leading underscore - # to prevent conflicts with column names. - @property - def _mapping(self) -> RowMapping: ... - @property - def _fields(self) -> tuple[str, ...]: ... - def _asdict(self) -> dict[str, Any]: ... - -class LegacyRow(Row, metaclass=ABCMeta): - def has_key(self, key: str) -> bool: ... - def items(self) -> list[tuple[str, Any]]: ... - def iterkeys(self) -> Iterator[str]: ... - def itervalues(self) -> Iterator[Any]: ... - def values(self) -> list[Any]: ... - -BaseRowProxy = BaseRow -RowProxy = Row - -class ROMappingView(KeysView[str], ValuesView[_VT_co], ItemsView[str, _VT_co], Generic[_VT_co]): # type: ignore[misc] - def __init__(self, mapping: RowMapping, items: list[_VT_co]) -> None: ... - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_VT_co]: ... # type: ignore[override] - def __eq__(self, other: ROMappingView[_VT_co]) -> bool: ... # type: ignore[override] - def __ne__(self, other: ROMappingView[_VT_co]) -> bool: ... # type: ignore[override] - -class RowMapping(BaseRow, Mapping[str, Row]): - __getitem__: Any - def __iter__(self) -> Iterator[str]: ... - def __len__(self) -> int: ... - def items(self) -> ROMappingView[tuple[str, Any]]: ... # type: ignore[override] - def keys(self) -> list[str]: ... # type: ignore[override] - def values(self) -> ROMappingView[Any]: ... # type: ignore[override] diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/strategies.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/strategies.pyi deleted file mode 100644 index 25239d17b276..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/strategies.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from typing import Any - -class MockEngineStrategy: - MockConnection: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi deleted file mode 100644 index 7a5b30789954..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi +++ /dev/null @@ -1,65 +0,0 @@ -from _typeshed import SupportsItems, Unused -from collections.abc import Iterable, Mapping, Sequence -from typing import Any, NamedTuple -from typing_extensions import Self, TypeAlias - -from ..util import immutabledict -from .interfaces import Dialect - -# object that produces a password when called with str() -_PasswordObject: TypeAlias = object - -# stub-only helper class -class _URLTuple(NamedTuple): - drivername: str - username: str | None - password: str | _PasswordObject | None - host: str | None - port: int | None - database: str | None - query: immutabledict[str, str | tuple[str, ...]] - -_Query: TypeAlias = Mapping[str, str | Sequence[str]] | Sequence[tuple[str, str | Sequence[str]]] - -class URL(_URLTuple): - def __new__(self, *arg, **kw) -> Self | URL: ... - @classmethod - def create( - cls, - drivername: str, - username: str | None = None, - password: str | _PasswordObject | None = None, - host: str | None = None, - port: int | None = None, - database: str | None = None, - query: _Query | None = ..., - ) -> URL: ... - def set( - self, - drivername: str | None = None, - username: str | None = None, - password: str | _PasswordObject | None = None, - host: str | None = None, - port: int | None = None, - database: str | None = None, - query: _Query | None = None, - ) -> Self: ... - def update_query_string(self, query_string: str, append: bool = False) -> Self: ... - def update_query_pairs(self, key_value_pairs: Iterable[tuple[str, str]], append: bool = False) -> Self: ... - def update_query_dict(self, query_parameters: SupportsItems[str, str | Sequence[str]], append: bool = False) -> Self: ... - def difference_update_query(self, names: Iterable[str]) -> URL: ... - @property - def normalized_query(self) -> immutabledict[str, tuple[str, ...]]: ... - def __to_string__(self, hide_password: bool = True) -> str: ... - def render_as_string(self, hide_password: bool = True) -> str: ... - def __copy__(self) -> Self: ... - def __deepcopy__(self, memo: Unused) -> Self: ... - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... - def get_backend_name(self) -> str: ... - def get_driver_name(self) -> str: ... - def get_dialect(self) -> type[Dialect]: ... - def translate_connect_args(self, names: list[str] | None = None, **kw: str) -> dict[str, Any]: ... - -def make_url(name_or_url: str | URL) -> URL: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/util.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/util.pyi deleted file mode 100644 index 0fdef74350e3..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/engine/util.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from collections.abc import Callable -from types import TracebackType -from typing import Any -from typing_extensions import Self - -def connection_memoize(key: str) -> Callable[..., Any]: ... - -class TransactionalContext: - def __enter__(self) -> Self: ... - def __exit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/event/__init__.pyi deleted file mode 100644 index a0b0fcea8bff..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/event/__init__.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from .api import ( - CANCEL as CANCEL, - NO_RETVAL as NO_RETVAL, - contains as contains, - listen as listen, - listens_for as listens_for, - remove as remove, -) -from .attr import RefCollection as RefCollection -from .base import Events as Events, dispatcher as dispatcher diff --git a/stubs/SQLAlchemy/sqlalchemy/event/api.pyi b/stubs/SQLAlchemy/sqlalchemy/event/api.pyi deleted file mode 100644 index bea12af06067..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/event/api.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Any - -CANCEL: Any -NO_RETVAL: Any - -def listen(target, identifier, fn, *args, **kw) -> None: ... -def listens_for(target, identifier, *args, **kw): ... -def remove(target, identifier, fn) -> None: ... -def contains(target, identifier, fn): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/attr.pyi b/stubs/SQLAlchemy/sqlalchemy/event/attr.pyi deleted file mode 100644 index 5f03e16bc8e4..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/event/attr.pyi +++ /dev/null @@ -1,85 +0,0 @@ -from typing import Any - -from .. import util - -class RefCollection(util.MemoizedSlots): - ref: Any - -class _empty_collection: - def append(self, element) -> None: ... - def extend(self, other) -> None: ... - def remove(self, element) -> None: ... - def __iter__(self): ... - def clear(self) -> None: ... - -class _ClsLevelDispatch(RefCollection): - name: Any - clsname: Any - arg_names: Any - has_kw: Any - legacy_signatures: Any - def __init__(self, parent_dispatch_cls, fn): ... - def insert(self, event_key, propagate) -> None: ... - def append(self, event_key, propagate) -> None: ... - def update_subclass(self, target) -> None: ... - def remove(self, event_key) -> None: ... - def clear(self) -> None: ... - def for_modify(self, obj): ... - -class _InstanceLevelDispatch(RefCollection): ... - -class _EmptyListener(_InstanceLevelDispatch): - propagate: Any - listeners: Any - parent: Any - parent_listeners: Any - name: Any - def __init__(self, parent, target_cls) -> None: ... - def for_modify(self, obj): ... - exec_once: Any - exec_once_unless_exception: Any - insert: Any - append: Any - remove: Any - clear: Any - def __call__(self, *args, **kw) -> None: ... - def __len__(self) -> int: ... - def __iter__(self): ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - -class _CompoundListener(_InstanceLevelDispatch): - def exec_once(self, *args, **kw) -> None: ... - def exec_once_unless_exception(self, *args, **kw) -> None: ... - def __call__(self, *args, **kw) -> None: ... - def __len__(self) -> int: ... - def __iter__(self): ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - -class _ListenerCollection(_CompoundListener): - parent_listeners: Any - parent: Any - name: Any - listeners: Any - propagate: Any - def __init__(self, parent, target_cls) -> None: ... - def for_modify(self, obj): ... - def insert(self, event_key, propagate) -> None: ... - def append(self, event_key, propagate) -> None: ... - def remove(self, event_key) -> None: ... - def clear(self) -> None: ... - -class _JoinedListener(_CompoundListener): - parent: Any - name: Any - local: Any - parent_listeners: Any - def __init__(self, parent, name, local) -> None: ... - @property - def listeners(self): ... - def for_modify(self, obj): ... - def insert(self, event_key, propagate) -> None: ... - def append(self, event_key, propagate) -> None: ... - def remove(self, event_key) -> None: ... - def clear(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/base.pyi b/stubs/SQLAlchemy/sqlalchemy/event/base.pyi deleted file mode 100644 index d367033311fb..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/event/base.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class _UnpickleDispatch: - def __call__(self, _instance_cls): ... - -class _Dispatch: - def __init__(self, parent, instance_cls: Incomplete | None = None) -> None: ... - def __getattr__(self, name: str): ... - def __reduce__(self): ... - -class _EventMeta(type): - def __init__(cls, classname, bases, dict_) -> None: ... - -class Events(metaclass=_EventMeta): - dispatch: Any - -class _JoinedDispatcher: - local: Any - parent: Any - def __init__(self, local, parent) -> None: ... - def __getattr__(self, name: str): ... - -class dispatcher: - dispatch: Any - events: Any - def __init__(self, events) -> None: ... - def __get__(self, obj, cls): ... - -class slots_dispatcher(dispatcher): - def __get__(self, obj, cls): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/legacy.pyi b/stubs/SQLAlchemy/sqlalchemy/event/legacy.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi b/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi deleted file mode 100644 index 616d3d784803..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class _EventKey: - target: Any - identifier: Any - fn: Any - fn_key: Any - fn_wrap: Any - dispatch_target: Any - def __init__(self, target, identifier, fn, dispatch_target, _fn_wrap: Incomplete | None = None) -> None: ... - def with_wrapper(self, fn_wrap): ... - def with_dispatch_target(self, dispatch_target): ... - def listen(self, *args, **kw) -> None: ... - def remove(self) -> None: ... - def contains(self): ... - def base_listen( - self, - propagate: bool = False, - insert: bool = False, - named: bool = False, - retval: Incomplete | None = None, - asyncio: bool = False, - ) -> None: ... - def append_to_list(self, owner, list_): ... - def remove_from_list(self, owner, list_) -> None: ... - def prepend_to_list(self, owner, list_): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/events.pyi b/stubs/SQLAlchemy/sqlalchemy/events.pyi deleted file mode 100644 index 8bbbfa58d8d8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/events.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from .engine.events import ConnectionEvents as ConnectionEvents, DialectEvents as DialectEvents -from .pool.events import PoolEvents as PoolEvents -from .sql.base import SchemaEventTarget as SchemaEventTarget -from .sql.events import DDLEvents as DDLEvents diff --git a/stubs/SQLAlchemy/sqlalchemy/exc.pyi b/stubs/SQLAlchemy/sqlalchemy/exc.pyi deleted file mode 100644 index 876de1270d83..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/exc.pyi +++ /dev/null @@ -1,147 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, ClassVar - -class HasDescriptionCode: - code: str | None - def __init__(self, *arg: Any, code: str | None = ..., **kw: Any) -> None: ... - -class SQLAlchemyError(HasDescriptionCode, Exception): - def __unicode__(self) -> str: ... - -class ArgumentError(SQLAlchemyError): ... - -class ObjectNotExecutableError(ArgumentError): - target: Any - def __init__(self, target) -> None: ... - def __reduce__(self): ... - -class NoSuchModuleError(ArgumentError): ... -class NoForeignKeysError(ArgumentError): ... -class AmbiguousForeignKeysError(ArgumentError): ... - -class CircularDependencyError(SQLAlchemyError): - cycles: Any - edges: Any - def __init__(self, message, cycles, edges, msg: Incomplete | None = None, code: Incomplete | None = None) -> None: ... - def __reduce__(self): ... - -class CompileError(SQLAlchemyError): ... - -class UnsupportedCompilationError(CompileError): - code: str - compiler: Any - element_type: Any - message: str | None - def __init__(self, compiler, element_type, message: str | None = None) -> None: ... - def __reduce__(self): ... - -class IdentifierError(SQLAlchemyError): ... - -class DisconnectionError(SQLAlchemyError): - invalidate_pool: bool - -class InvalidatePoolError(DisconnectionError): - invalidate_pool: bool - -class TimeoutError(SQLAlchemyError): ... -class InvalidRequestError(SQLAlchemyError): ... -class NoInspectionAvailable(InvalidRequestError): ... -class PendingRollbackError(InvalidRequestError): ... -class ResourceClosedError(InvalidRequestError): ... -class NoSuchColumnError(InvalidRequestError, KeyError): ... -class NoResultFound(InvalidRequestError): ... -class MultipleResultsFound(InvalidRequestError): ... -class NoReferenceError(InvalidRequestError): ... - -class AwaitRequired(InvalidRequestError): - code: str - -class MissingGreenlet(InvalidRequestError): - code: str - -class NoReferencedTableError(NoReferenceError): - table_name: Any - def __init__(self, message, tname) -> None: ... - def __reduce__(self): ... - -class NoReferencedColumnError(NoReferenceError): - table_name: Any - column_name: Any - def __init__(self, message, tname, cname) -> None: ... - def __reduce__(self): ... - -class NoSuchTableError(InvalidRequestError): ... -class UnreflectableTableError(InvalidRequestError): ... -class UnboundExecutionError(InvalidRequestError): ... -class DontWrapMixin: ... - -class StatementError(SQLAlchemyError): - statement: Any - params: Any - orig: Any - ismulti: Any - hide_parameters: Any - detail: Any - def __init__( - self, - message, - statement, - params, - orig, - hide_parameters: bool = False, - code: Incomplete | None = None, - ismulti: Incomplete | None = None, - ) -> None: ... - def add_detail(self, msg) -> None: ... - def __reduce__(self): ... - -class DBAPIError(StatementError): - code: str - @classmethod - def instance( - cls, - statement, - params, - orig, - dbapi_base_err, - hide_parameters: bool = False, - connection_invalidated: bool = False, - dialect: Incomplete | None = None, - ismulti: Incomplete | None = None, - ): ... - def __reduce__(self): ... - connection_invalidated: Any - def __init__( - self, - statement, - params, - orig, - hide_parameters: bool = False, - connection_invalidated: bool = False, - code: Incomplete | None = None, - ismulti: Incomplete | None = None, - ) -> None: ... - -class InterfaceError(DBAPIError): ... -class DatabaseError(DBAPIError): ... -class DataError(DatabaseError): ... -class OperationalError(DatabaseError): ... -class IntegrityError(DatabaseError): ... -class InternalError(DatabaseError): ... -class ProgrammingError(DatabaseError): ... -class NotSupportedError(DatabaseError): ... - -class SADeprecationWarning(HasDescriptionCode, DeprecationWarning): - deprecated_since: ClassVar[str | None] - -class Base20DeprecationWarning(SADeprecationWarning): - deprecated_since: ClassVar[str] - -class LegacyAPIWarning(Base20DeprecationWarning): ... -class RemovedIn20Warning(Base20DeprecationWarning): ... -class MovedIn20Warning(RemovedIn20Warning): ... - -class SAPendingDeprecationWarning(PendingDeprecationWarning): - deprecated_since: ClassVar[str | None] - -class SAWarning(HasDescriptionCode, RuntimeWarning): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi deleted file mode 100644 index a0b57ebcb686..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi +++ /dev/null @@ -1,200 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..orm import interfaces -from ..sql.operators import ColumnOperators -from ..util.langhelpers import memoized_property - -def association_proxy(target_collection, attr, **kw): ... - -ASSOCIATION_PROXY: Any - -class AssociationProxy(interfaces.InspectionAttrInfo): - is_attribute: bool - extension_type: Any - target_collection: Any - value_attr: Any - creator: Any - getset_factory: Any - proxy_factory: Any - proxy_bulk_set: Any - cascade_scalar_deletes: Any - key: Any - info: Any - def __init__( - self, - target_collection, - attr, - creator: Incomplete | None = None, - getset_factory: Incomplete | None = None, - proxy_factory: Incomplete | None = None, - proxy_bulk_set: Incomplete | None = None, - info: Incomplete | None = None, - cascade_scalar_deletes: bool = False, - ) -> None: ... - def __get__(self, obj, class_): ... - def __set__(self, obj, values) -> None: ... - def __delete__(self, obj) -> None: ... - def for_class(self, class_, obj: Incomplete | None = None): ... - -class AssociationProxyInstance: - parent: Any - key: Any - owning_class: Any - target_collection: Any - collection_class: Any - target_class: Any - value_attr: Any - def __init__(self, parent, owning_class, target_class, value_attr) -> None: ... - @classmethod - def for_proxy(cls, parent, owning_class, parent_instance): ... - def __clause_element__(self) -> None: ... - @property - def remote_attr(self): ... - @property - def local_attr(self): ... - @property - def attr(self): ... - @memoized_property - def scalar(self): ... - @property - def info(self): ... - def get(self, obj): ... - def set(self, obj, values) -> None: ... - def delete(self, obj) -> None: ... - def any(self, criterion: Incomplete | None = None, **kwargs): ... - def has(self, criterion: Incomplete | None = None, **kwargs): ... - -class AmbiguousAssociationProxyInstance(AssociationProxyInstance): - def get(self, obj): ... - def __eq__(self, obj): ... - def __ne__(self, obj): ... - def any(self, criterion: Incomplete | None = None, **kwargs) -> None: ... - def has(self, criterion: Incomplete | None = None, **kwargs) -> None: ... - -class ObjectAssociationProxyInstance(AssociationProxyInstance): - def contains(self, obj): ... - def __eq__(self, obj): ... - def __ne__(self, obj): ... - -class ColumnAssociationProxyInstance(ColumnOperators[Any], AssociationProxyInstance): - def __eq__(self, other) -> ColumnOperators[Any]: ... # type: ignore[override] - def operate(self, op, *other, **kwargs): ... - -class _lazy_collection: - parent: Any - target: Any - def __init__(self, obj, target) -> None: ... - def __call__(self): ... - -class _AssociationCollection: - lazy_collection: Any - creator: Any - getter: Any - setter: Any - parent: Any - def __init__(self, lazy_collection, creator, getter, setter, parent) -> None: ... - @property - def col(self): ... - def __len__(self) -> int: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - -class _AssociationList(_AssociationCollection): - def __getitem__(self, index): ... - def __setitem__(self, index, value) -> None: ... - def __delitem__(self, index) -> None: ... - def __contains__(self, value): ... - def __getslice__(self, start, end): ... - def __setslice__(self, start, end, values) -> None: ... - def __delslice__(self, start, end) -> None: ... - def __iter__(self): ... - def append(self, value) -> None: ... - def count(self, value): ... - def extend(self, values) -> None: ... - def insert(self, index, value) -> None: ... - def pop(self, index: int = -1): ... - def remove(self, value) -> None: ... - def reverse(self) -> None: ... - def sort(self) -> None: ... - def clear(self) -> None: ... - 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__: Any - def __iadd__(self, iterable): ... - def __imul__(self, n): ... - def index(self, item, *args): ... - def copy(self): ... - def __hash__(self) -> int: ... - -class _AssociationDict(_AssociationCollection): - def __getitem__(self, key): ... - def __setitem__(self, key, value) -> None: ... - def __delitem__(self, key) -> None: ... - def __contains__(self, key): ... - def has_key(self, key): ... - def __iter__(self): ... - def clear(self) -> None: ... - 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: Incomplete | None = None): ... - def setdefault(self, key, default: Incomplete | None = None): ... - def keys(self): ... - def items(self): ... - def values(self): ... - def pop(self, key, default=...): ... - def popitem(self): ... - def update(self, *a, **kw) -> None: ... - def copy(self): ... - def __hash__(self) -> int: ... - -class _AssociationSet(_AssociationCollection): - def __len__(self) -> int: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - def __contains__(self, value): ... - def __iter__(self): ... - def add(self, value) -> None: ... - def discard(self, value) -> None: ... - def remove(self, value) -> None: ... - def pop(self): ... - def update(self, other) -> None: ... - def __ior__(self, other): ... # type: ignore[misc] - def union(self, other): ... - __or__: Any - def difference(self, other): ... - __sub__: Any - def difference_update(self, other) -> None: ... - def __isub__(self, other): ... # type: ignore[misc] - def intersection(self, other): ... - __and__: Any - def intersection_update(self, other) -> None: ... - def __iand__(self, other): ... # type: ignore[misc] - def symmetric_difference(self, other): ... - __xor__: Any - def symmetric_difference_update(self, other) -> None: ... - def __ixor__(self, other): ... # type: ignore[misc] - def issubset(self, other): ... - def issuperset(self, other): ... - def clear(self) -> None: ... - 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) -> int: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi deleted file mode 100644 index e065d748f177..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi +++ /dev/null @@ -1,15 +0,0 @@ -from .engine import ( - AsyncConnection as AsyncConnection, - AsyncEngine as AsyncEngine, - AsyncTransaction as AsyncTransaction, - create_async_engine as create_async_engine, -) -from .events import AsyncConnectionEvents as AsyncConnectionEvents, AsyncSessionEvents as AsyncSessionEvents -from .result import AsyncMappingResult as AsyncMappingResult, AsyncResult as AsyncResult, AsyncScalarResult as AsyncScalarResult -from .scoping import async_scoped_session as async_scoped_session -from .session import ( - AsyncSession as AsyncSession, - AsyncSessionTransaction as AsyncSessionTransaction, - async_object_session as async_object_session, - async_session as async_session, -) diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi deleted file mode 100644 index cfeb58e92608..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from abc import ABC, ABCMeta, abstractmethod -from types import TracebackType - -class ReversibleProxy: ... - -class StartableContext(ABC, metaclass=ABCMeta): - @abstractmethod - async def start(self, is_ctxmanager: bool = False): ... - def __await__(self): ... - async def __aenter__(self): ... - @abstractmethod - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - -class ProxyComparable(ReversibleProxy): - def __hash__(self) -> int: ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi deleted file mode 100644 index 9a389d55930c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi +++ /dev/null @@ -1,103 +0,0 @@ -from _typeshed import Incomplete -from types import TracebackType -from typing import Any - -from .base import ProxyComparable, StartableContext - -def create_async_engine(*arg, **kw) -> AsyncEngine: ... -def async_engine_from_config(configuration, prefix: str = "sqlalchemy.", **kwargs) -> AsyncEngine: ... - -class AsyncConnectable: - dispatch: Incomplete - -class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): - engine: Any - sync_engine: Any - sync_connection: Any - def __init__(self, async_engine, sync_connection: Incomplete | None = None) -> None: ... - async def start(self, is_ctxmanager: bool = False): ... - @property - def connection(self) -> None: ... - async def get_raw_connection(self): ... - @property - def info(self): ... - def begin(self): ... - def begin_nested(self): ... - async def invalidate(self, exception: Incomplete | None = None): ... - async def get_isolation_level(self): ... - async def set_isolation_level(self): ... - def in_transaction(self): ... - def in_nested_transaction(self): ... - def get_transaction(self): ... - def get_nested_transaction(self): ... - async def execution_options(self, **opt): ... - async def commit(self) -> None: ... - async def rollback(self) -> None: ... - async def close(self) -> None: ... - async def exec_driver_sql(self, statement, parameters: Incomplete | None = None, execution_options=...): ... - async def stream(self, statement, parameters: Incomplete | None = None, execution_options=...): ... - async def execute(self, statement, parameters: Incomplete | None = None, execution_options=...): ... - async def scalar(self, statement, parameters: Incomplete | None = None, execution_options=...): ... - async def scalars(self, statement, parameters: Incomplete | None = None, execution_options=...): ... - async def stream_scalars(self, statement, parameters: Incomplete | None = None, execution_options=...): ... - async def run_sync(self, fn, *arg, **kw): ... - def __await__(self): ... - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - # proxied from Connection - dialect: Any - @property - def closed(self): ... - @property - def invalidated(self): ... - @property - def default_isolation_level(self): ... - -class AsyncEngine(ProxyComparable, AsyncConnectable): - class _trans_ctx(StartableContext): - conn: Any - def __init__(self, conn) -> None: ... - transaction: Any - async def start(self, is_ctxmanager: bool = False): ... - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - sync_engine: Any - def __init__(self, sync_engine) -> None: ... - def begin(self): ... - def connect(self): ... - async def raw_connection(self): ... - def execution_options(self, **opt): ... - async def dispose(self): ... - # proxied from Engine - url: Any - pool: Any - dialect: Any - echo: Any - @property - def engine(self): ... - @property - def name(self): ... - @property - def driver(self): ... - def clear_compiled_cache(self) -> None: ... - def update_execution_options(self, **opt) -> None: ... - def get_execution_options(self): ... - -class AsyncTransaction(ProxyComparable, StartableContext): - connection: Any - sync_transaction: Any - nested: Any - def __init__(self, connection, nested: bool = False) -> None: ... - @property - def is_valid(self): ... - @property - def is_active(self): ... - async def close(self) -> None: ... - async def rollback(self) -> None: ... - async def commit(self) -> None: ... - async def start(self, is_ctxmanager: bool = False): ... - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/events.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/events.pyi deleted file mode 100644 index e9a8bf1a5916..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/events.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from ...engine import events as engine_event -from ...orm import events as orm_event - -class AsyncConnectionEvents(engine_event.ConnectionEvents): ... -class AsyncSessionEvents(orm_event.SessionEvents): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/exc.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/exc.pyi deleted file mode 100644 index 56f3b638ab1b..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/exc.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from ...exc import InvalidRequestError - -class AsyncMethodRequired(InvalidRequestError): ... -class AsyncContextNotStarted(InvalidRequestError): ... -class AsyncContextAlreadyStarted(InvalidRequestError): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi deleted file mode 100644 index 6afa6ed6993a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi +++ /dev/null @@ -1,56 +0,0 @@ -from _typeshed import Incomplete - -from ...engine.result import FilterResult - -class AsyncCommon(FilterResult): - async def close(self) -> None: ... # type: ignore[override] # supertype is not async - -class AsyncResult(AsyncCommon): - def __init__(self, real_result) -> None: ... - def keys(self): ... - def unique(self, strategy: Incomplete | None = None): ... - def columns(self, *col_expressions): ... - async def partitions(self, size: Incomplete | None = None) -> None: ... - async def fetchone(self): ... - async def fetchmany(self, size: Incomplete | None = None): ... - async def all(self): ... - def __aiter__(self): ... - async def __anext__(self): ... - async def first(self): ... - async def one_or_none(self): ... - async def scalar_one(self): ... - async def scalar_one_or_none(self): ... - async def one(self): ... - async def scalar(self): ... - async def freeze(self): ... - def scalars(self, index: int = 0): ... - def mappings(self): ... - -class AsyncScalarResult(AsyncCommon): - def __init__(self, real_result, index) -> None: ... - def unique(self, strategy: Incomplete | None = None): ... - async def partitions(self, size: Incomplete | None = None) -> None: ... - async def fetchall(self): ... - async def fetchmany(self, size: Incomplete | None = None): ... - async def all(self): ... - def __aiter__(self): ... - async def __anext__(self): ... - async def first(self): ... - async def one_or_none(self): ... - async def one(self): ... - -class AsyncMappingResult(AsyncCommon): - def __init__(self, result) -> None: ... - def keys(self): ... - def unique(self, strategy: Incomplete | None = None): ... - def columns(self, *col_expressions): ... - async def partitions(self, size: Incomplete | None = None) -> None: ... - async def fetchall(self): ... - async def fetchone(self): ... - async def fetchmany(self, size: Incomplete | None = None): ... - async def all(self): ... - def __aiter__(self): ... - async def __anext__(self): ... - async def first(self): ... - async def one_or_none(self): ... - async def one(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi deleted file mode 100644 index 3c203866cd46..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi +++ /dev/null @@ -1,80 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ...orm.scoping import ScopedSessionMixin -from ...util.langhelpers import memoized_property - -class async_scoped_session(ScopedSessionMixin): - session_factory: Any - registry: Any - def invalidate(self): ... - def __init__(self, session_factory, scopefunc) -> None: ... - async def remove(self) -> None: ... - # proxied from Session - @classmethod - async def close_all(cls): ... - @classmethod - def identity_key(cls, *args, **kwargs): ... - @classmethod - def object_session(cls, instance): ... - bind: Any - identity_map: Any - autoflush: Any - def __contains__(self, instance): ... - def __iter__(self): ... - def add(self, instance, _warn: bool = True) -> None: ... - def add_all(self, instances) -> None: ... - def begin(self, **kw): ... - def begin_nested(self, **kw): ... - async def close(self): ... - async def commit(self): ... - async def connection(self, **kw): ... - async def delete(self, instance): ... - async def execute( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... - def expire_all(self) -> None: ... - def expunge(self, instance) -> None: ... - def expunge_all(self) -> None: ... - async def flush(self, objects: Incomplete | None = None) -> None: ... - async def get( - self, - entity, - ident, - options: Incomplete | None = None, - populate_existing: bool = False, - with_for_update: Incomplete | None = None, - identity_token: Incomplete | None = None, - ): ... - def get_bind( - self, mapper: Incomplete | None = None, clause: Incomplete | None = None, bind: Incomplete | None = None, **kw - ): ... - def is_modified(self, instance, include_collections: bool = True): ... - async def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... - async def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None): ... - async def rollback(self): ... - async def scalar( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def scalars( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def stream( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def stream_scalars( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - @property - def dirty(self): ... - @property - def deleted(self): ... - @property - def new(self): ... - @property - def is_active(self): ... - @property - def no_autoflush(self) -> None: ... - @memoized_property - def info(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi deleted file mode 100644 index 6c9e95b43623..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi +++ /dev/null @@ -1,120 +0,0 @@ -from _typeshed import Incomplete -from types import TracebackType -from typing import Any -from typing_extensions import Self - -from ...util.langhelpers import memoized_property -from .base import ReversibleProxy, StartableContext - -class AsyncSession(ReversibleProxy): - dispatch: Any - bind: Any - binds: Any - sync_session_class: Any - sync_session: Any - def __init__( - self, bind: Incomplete | None = None, binds: Incomplete | None = None, sync_session_class: Incomplete | None = None, **kw - ) -> None: ... - async def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None): ... - async def run_sync(self, fn, *arg, **kw): ... - async def execute( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def scalar( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def scalars( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def get( - self, - entity, - ident, - options: Incomplete | None = None, - populate_existing: bool = False, - with_for_update: Incomplete | None = None, - identity_token: Incomplete | None = None, - ): ... - async def stream( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def stream_scalars( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - async def delete(self, instance): ... - async def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... - async def flush(self, objects: Incomplete | None = None) -> None: ... - def get_transaction(self): ... - def get_nested_transaction(self): ... - def get_bind( - self, mapper: Incomplete | None = None, clause: Incomplete | None = None, bind: Incomplete | None = None, **kw - ): ... - async def connection(self, **kw): ... - def begin(self, **kw): ... - def begin_nested(self, **kw): ... - async def rollback(self): ... - async def commit(self): ... - async def close(self): ... - async def invalidate(self): ... - @classmethod - async def close_all(cls): ... - async def __aenter__(self) -> Self: ... - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - # proxied from Session - identity_map: Any - autoflush: Any - @classmethod - def identity_key(cls, *args, **kwargs): ... - @classmethod - def object_session(cls, instance): ... - def __contains__(self, instance): ... - def __iter__(self): ... - def add(self, instance, _warn: bool = True) -> None: ... - def add_all(self, instances) -> None: ... - def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... - def expire_all(self) -> None: ... - def expunge(self, instance) -> None: ... - def expunge_all(self) -> None: ... - def is_modified(self, instance, include_collections: bool = True): ... - def in_transaction(self): ... - def in_nested_transaction(self): ... - @property - def no_autoflush(self) -> None: ... - @property - def is_active(self): ... - @property - def dirty(self): ... - @property - def deleted(self): ... - @property - def new(self): ... - @memoized_property - def info(self): ... - -class _AsyncSessionContextManager: - async_session: Any - def __init__(self, async_session) -> None: ... - trans: Any - async def __aenter__(self): ... - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - -class AsyncSessionTransaction(ReversibleProxy, StartableContext): - session: Any - nested: Any - sync_transaction: Any - def __init__(self, session, nested: bool = False) -> None: ... - @property - def is_active(self): ... - async def rollback(self) -> None: ... - async def commit(self) -> None: ... - async def start(self, is_ctxmanager: bool = False): ... - async def __aexit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - -def async_object_session(instance): ... -def async_session(session): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi deleted file mode 100644 index 47a5793cb398..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -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__: bool - classes: Any - @classmethod - def prepare( - cls, - autoload_with: Incomplete | None = None, - engine: Incomplete | None = None, - reflect: bool = False, - schema: Incomplete | None = None, - classname_for_table: Incomplete | None = None, - collection_class: Incomplete | None = None, - name_for_scalar_relationship: Incomplete | None = None, - name_for_collection_relationship: Incomplete | None = None, - generate_relationship: Incomplete | None = None, - reflection_options=..., - ) -> None: ... - -def automap_base(declarative_base: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi deleted file mode 100644 index 95ac4b0d6dd2..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi +++ /dev/null @@ -1,49 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..orm.strategy_options import Load, loader_option - -log: Any - -class Bakery: - cls: Any - cache: Any - def __init__(self, cls_, cache) -> None: ... - def __call__(self, initial_fn, *args): ... - -class BakedQuery: - steps: Any - def __init__(self, bakery, initial_fn, args=()) -> None: ... - @classmethod - def bakery(cls, size: int = 200, _size_alert: Incomplete | None = None): ... - 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 = False): ... - def to_query(self, query_or_session): ... - -class Result: - bq: Any - session: Any - def __init__(self, bq, session) -> None: ... - def params(self, *args, **kw): ... - def with_post_criteria(self, fn): ... - 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() -> None: ... -def unbake_lazy_loaders() -> None: ... -@loader_option() -def baked_lazyload(loadopt: Load, attr) -> loader_option: ... -def baked_lazyload_all(loadopt: Load, attr) -> loader_option: ... - -bakery = BakedQuery.bakery diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi deleted file mode 100644 index 79b29eea9587..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Any - -def compiles(class_, *specs): ... -def deregister(class_) -> None: ... - -class _dispatcher: - specs: Any - def __call__(self, element, compiler, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/declarative/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/declarative/__init__.pyi deleted file mode 100644 index 7eddf8603c37..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/declarative/__init__.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from ...orm.decl_api import ( - DeclarativeMeta as DeclarativeMeta, - as_declarative as as_declarative, - declarative_base as declarative_base, - declared_attr as declared_attr, - has_inherited_table as has_inherited_table, - synonym_for as synonym_for, -) -from .extensions import ( - AbstractConcreteBase as AbstractConcreteBase, - ConcreteBase as ConcreteBase, - DeferredReflection as DeferredReflection, - instrument_declarative as instrument_declarative, -) - -__all__ = [ - "declarative_base", - "synonym_for", - "has_inherited_table", - "instrument_declarative", - "declared_attr", - "as_declarative", - "ConcreteBase", - "AbstractConcreteBase", - "DeclarativeMeta", - "DeferredReflection", -] diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/declarative/extensions.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/declarative/extensions.pyi deleted file mode 100644 index c4fbf0ff5444..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/declarative/extensions.pyi +++ /dev/null @@ -1,14 +0,0 @@ -def instrument_declarative(cls, cls_registry, metadata) -> None: ... - -class ConcreteBase: - @classmethod - def __declare_first__(cls) -> None: ... - -class AbstractConcreteBase(ConcreteBase): - __no_table__: bool - @classmethod - def __declare_first__(cls) -> None: ... - -class DeferredReflection: - @classmethod - def prepare(cls, engine) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi deleted file mode 100644 index b8355d51ced1..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi +++ /dev/null @@ -1,34 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, TypeVar - -from ..orm.query import Query -from ..orm.session import Session - -_T = TypeVar("_T") - -class ShardedQuery(Query[_T], Generic[_T]): - id_chooser: Any - query_chooser: Any - execute_chooser: Any - def __init__(self, *args, **kwargs) -> None: ... - def set_shard(self, shard_id): ... - -class ShardedSession(Session): - shard_chooser: Any - id_chooser: Any - execute_chooser: Any - query_chooser: Any - def __init__( - self, - shard_chooser, - id_chooser, - execute_chooser: Incomplete | None = None, - shards: Incomplete | None = None, - query_cls=..., - **kwargs, - ): ... - def connection_callable( - self, mapper: Incomplete | None = None, instance: Incomplete | None = None, shard_id: Incomplete | None = None, **kwargs - ): ... - def get_bind(self, mapper: Incomplete | None = None, shard_id: Incomplete | None = None, instance: Incomplete | None = None, clause: Incomplete | None = None, **kw): ... # type: ignore[override] - def bind_shard(self, shard_id, bind) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi deleted file mode 100644 index d9d20108f4ab..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi +++ /dev/null @@ -1,68 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..orm import interfaces - -HYBRID_METHOD: Any -HYBRID_PROPERTY: Any - -class hybrid_method(interfaces.InspectionAttrInfo): - is_attribute: bool - extension_type: Any - func: Any - def __init__(self, func, expr: Incomplete | None = None) -> None: ... - def __get__(self, instance, owner): ... - expr: Any - def expression(self, expr): ... - -class hybrid_property(interfaces.InspectionAttrInfo): - is_attribute: bool - extension_type: Any - fget: Any - fset: Any - fdel: Any - expr: Any - custom_comparator: Any - update_expr: Any - def __init__( - self, - fget, - fset: Incomplete | None = None, - fdel: Incomplete | None = None, - expr: Incomplete | None = None, - custom_comparator: Incomplete | None = None, - update_expr: Incomplete | None = None, - ) -> None: ... - def __get__(self, instance, owner): ... - def __set__(self, instance, value) -> None: ... - def __delete__(self, instance) -> None: ... - @property - def overrides(self): ... - def getter(self, fget): ... - def setter(self, fset): ... - def deleter(self, fdel): ... - def expression(self, expr): ... - def comparator(self, comparator): ... - def update_expression(self, meth): ... - -class Comparator(interfaces.PropComparator[Any]): - property: Any - expression: Any - def __init__(self, expression) -> None: ... - def __clause_element__(self): ... - def adapt_to_entity(self, adapt_to_entity): ... - -_property = property - -class ExprComparator(Comparator): - cls: Any - expression: Any - hybrid: Any - def __init__(self, cls, expression, hybrid) -> None: ... - def __getattr__(self, key: str): ... - @_property - def info(self): ... - @_property - def property(self): ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi deleted file mode 100644 index 8d34ff0db8b8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..ext.hybrid import hybrid_property - -class index_property(hybrid_property): - attr_name: Any - index: Any - default: Any - datatype: Any - onebased: Any - def __init__( - self, attr_name, index, default=..., datatype: Incomplete | None = None, mutable: bool = True, onebased: bool = True - ): ... - def fget(self, instance): ... - def fset(self, instance, value) -> None: ... - def fdel(self, instance) -> None: ... - def expr(self, model): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi deleted file mode 100644 index d88af6e40c01..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi +++ /dev/null @@ -1,55 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..orm.instrumentation import ClassManager, InstrumentationFactory - -INSTRUMENTATION_MANAGER: str - -def find_native_user_instrumentation_hook(cls): ... - -instrumentation_finders: Any - -class ExtendedInstrumentationRegistry(InstrumentationFactory): - def unregister(self, class_) -> None: ... - 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) -> None: ... - def unregister(self, class_, manager) -> None: ... - def manager_getter(self, class_): ... - def instrument_attribute(self, class_, key, inst) -> None: ... - def post_configure_attribute(self, class_, key, inst) -> None: ... - def install_descriptor(self, class_, key, inst) -> None: ... - def uninstall_descriptor(self, class_, key) -> None: ... - def install_member(self, class_, key, implementation) -> None: ... - def uninstall_member(self, class_, key) -> None: ... - def instrument_collection_class(self, class_, key, collection_class): ... - def get_instance_dict(self, class_, instance): ... - def initialize_instance_dict(self, class_, instance) -> None: ... - def install_state(self, class_, instance, state) -> None: ... - def remove_state(self, class_, instance) -> None: ... - def state_getter(self, class_): ... - def dict_getter(self, class_): ... - -class _ClassInstrumentationAdapter(ClassManager): - def __init__(self, class_, override) -> None: ... - def manage(self) -> None: ... - def unregister(self) -> None: ... - def manager_getter(self): ... - def instrument_attribute(self, key, inst, propagated: bool = False) -> None: ... - def post_configure_attribute(self, key) -> None: ... - def install_descriptor(self, key, inst) -> None: ... - def uninstall_descriptor(self, key) -> None: ... - def install_member(self, key, implementation) -> None: ... - def uninstall_member(self, key) -> None: ... - def instrument_collection_class(self, key, collection_class): ... - def initialize_collection(self, key, state, factory): ... - def new_instance(self, state: Incomplete | None = None): ... - def setup_instance(self, instance, state: Incomplete | None = None): ... - def teardown_instance(self, instance) -> None: ... - def has_state(self, instance): ... - def state_getter(self): ... - def dict_getter(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/mutable.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/mutable.pyi deleted file mode 100644 index c1e4be44b324..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/mutable.pyi +++ /dev/null @@ -1,64 +0,0 @@ -from typing import Any - -class MutableBase: - @classmethod - def coerce(cls, key, value) -> None: ... - -class Mutable(MutableBase): - def changed(self) -> None: ... - @classmethod - def associate_with_attribute(cls, attribute) -> None: ... - @classmethod - def associate_with(cls, sqltype) -> None: ... - @classmethod - def as_mutable(cls, sqltype): ... - -class MutableComposite(MutableBase): - def changed(self) -> None: ... - -class MutableDict(Mutable, dict[Any, Any]): - def __setitem__(self, key, value) -> None: ... - def setdefault(self, key, value): ... - def __delitem__(self, key) -> None: ... - def update(self, *a, **kw) -> None: ... - def pop(self, *arg): ... - def popitem(self): ... - def clear(self) -> None: ... - @classmethod - def coerce(cls, key, value): ... - -class MutableList(Mutable, list[Any]): - def __reduce_ex__(self, proto): ... - def __setitem__(self, index, value) -> None: ... - def __setslice__(self, start, end, value) -> None: ... - def __delitem__(self, index) -> None: ... - def __delslice__(self, start, end) -> None: ... - def pop(self, *arg): ... - def append(self, x) -> None: ... - def extend(self, x) -> None: ... - def __iadd__(self, x): ... # type: ignore[misc] - def insert(self, i, x) -> None: ... - def remove(self, i) -> None: ... - def clear(self) -> None: ... - def sort(self, **kw) -> None: ... - def reverse(self) -> None: ... - @classmethod - def coerce(cls, index, value): ... - -class MutableSet(Mutable, set[Any]): - def update(self, *arg) -> None: ... - def intersection_update(self, *arg) -> None: ... - def difference_update(self, *arg) -> None: ... - def symmetric_difference_update(self, *arg) -> None: ... - def __ior__(self, other): ... # type: ignore[misc] - def __iand__(self, other): ... # type: ignore[misc] - def __ixor__(self, other): ... # type: ignore[misc] - def __isub__(self, other): ... # type: ignore[misc] - def add(self, elem) -> None: ... - def remove(self, elem) -> None: ... - def discard(self, elem) -> None: ... - def pop(self, *arg): ... - def clear(self) -> None: ... - @classmethod - def coerce(cls, index, value): ... - def __reduce_ex__(self, proto): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi deleted file mode 100644 index bebca695be58..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi +++ /dev/null @@ -1,22 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def ordering_list(attr, count_from: Incomplete | None = None, **kw): ... - -class OrderingList(list[Any]): - ordering_attr: Any - ordering_func: Any - reorder_on_append: Any - def __init__( - self, ordering_attr: Incomplete | None = None, ordering_func: Incomplete | None = None, reorder_on_append: bool = False - ) -> None: ... - def reorder(self) -> None: ... - def append(self, entity) -> None: ... - def insert(self, index, entity) -> None: ... - def remove(self, entity) -> None: ... - def pop(self, index: int = -1): ... # type: ignore[override] - def __setitem__(self, index, entity) -> None: ... - def __delitem__(self, index) -> None: ... - def __setslice__(self, start, end, values) -> None: ... - def __delslice__(self, start, end) -> None: ... - def __reduce__(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi deleted file mode 100644 index 3584cf3ebd4c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from _typeshed import Incomplete - -def Serializer(*args, **kw): ... -def Deserializer( - file, metadata: Incomplete | None = None, scoped_session: Incomplete | None = None, engine: Incomplete | None = None -): ... -def dumps(obj, protocol=5): ... -def loads( - data, metadata: Incomplete | None = None, scoped_session: Incomplete | None = None, engine: Incomplete | None = None -): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/future/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/future/__init__.pyi deleted file mode 100644 index 00f3a300bcd7..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/future/__init__.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any - -from .engine import Connection as Connection, Engine as Engine, create_engine as create_engine - -select: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi b/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi deleted file mode 100644 index 049185fd8048..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, overload -from typing_extensions import Literal - -from ..engine import Connection as _LegacyConnection, Engine as _LegacyEngine -from ..engine.base import OptionEngineMixin -from ..engine.mock import MockConnection -from ..engine.url import URL - -NO_OPTIONS: Any - -@overload -def create_engine(url: URL | str, *, strategy: Literal["mock"], **kwargs) -> MockConnection: ... # type: ignore[misc] -@overload -def create_engine( - url: URL | str, *, module: Incomplete | None = ..., enable_from_linting: bool = ..., future: bool = ..., **kwargs -) -> Engine: ... - -class Connection(_LegacyConnection): - def begin(self): ... - def begin_nested(self): ... - def commit(self) -> None: ... - def rollback(self) -> None: ... - def close(self) -> None: ... - def execute(self, statement, parameters: Incomplete | None = None, execution_options: Incomplete | None = None): ... # type: ignore[override] - def scalar(self, statement, parameters: Incomplete | None = None, execution_options: Incomplete | None = None): ... # type: ignore[override] - -class Engine(_LegacyEngine): - transaction: Any - run_callable: Any - execute: Any - scalar: Any - table_names: Any - has_table: Any - def begin(self) -> None: ... # type: ignore[override] - def connect(self): ... - -class OptionEngine(OptionEngineMixin, Engine): ... # type: ignore[misc] diff --git a/stubs/SQLAlchemy/sqlalchemy/future/orm/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/future/orm/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/inspection.pyi b/stubs/SQLAlchemy/sqlalchemy/inspection.pyi deleted file mode 100644 index 3e92030a6f5d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/inspection.pyi +++ /dev/null @@ -1 +0,0 @@ -def inspect(subject, raiseerr: bool = True): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/log.pyi b/stubs/SQLAlchemy/sqlalchemy/log.pyi deleted file mode 100644 index dbfccc8092d5..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/log.pyi +++ /dev/null @@ -1,51 +0,0 @@ -import sys -from _typeshed import Unused -from logging import Logger -from typing import Any, TypeVar, overload -from typing_extensions import Final, Literal, Self, TypeAlias - -_ClsT = TypeVar("_ClsT", bound=type) -_EchoFlag: TypeAlias = bool | Literal["debug"] | None - -if sys.version_info >= (3, 8): - STACKLEVEL: Final = True - - if sys.version_info >= (3, 11): - STACKLEVEL_OFFSET: Final = 2 - else: - STACKLEVEL_OFFSET: Final = 1 -else: - STACKLEVEL: Final = False - STACKLEVEL_OFFSET: Final = 0 - -rootlogger: Any - -def class_logger(cls: _ClsT) -> _ClsT: ... - -class Identified: - logging_name: str | None - -class InstanceLogger: - echo: _EchoFlag - logger: Logger - def __init__(self, echo: _EchoFlag, name: str | None) -> None: ... - def debug(self, msg, *args, **kwargs) -> None: ... - def info(self, msg, *args, **kwargs) -> None: ... - def warning(self, msg, *args, **kwargs) -> None: ... - warn = warning - def error(self, msg, *args, **kwargs) -> None: ... - def exception(self, msg, *args, **kwargs) -> None: ... - def critical(self, msg, *args, **kwargs) -> None: ... - def log(self, level, msg, *args, **kwargs) -> None: ... - def isEnabledFor(self, level): ... - def getEffectiveLevel(self): ... - -def instance_logger(instance: Identified, echoflag: _EchoFlag = None) -> None: ... - -class echo_property: - __doc__: str - @overload - def __get__(self, instance: None, owner: Unused) -> Self: ... - @overload - def __get__(self, instance: Identified, owner: Unused) -> _EchoFlag: ... - def __set__(self, instance: Identified, value: _EchoFlag) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi deleted file mode 100644 index a0ba4126d5fa..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi +++ /dev/null @@ -1,126 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..util.langhelpers import public_factory as public_factory -from . import exc as exc, strategy_options as strategy_options -from .attributes import ( - AttributeEvent as AttributeEvent, - InstrumentedAttribute as InstrumentedAttribute, - Mapped as Mapped, - QueryableAttribute as QueryableAttribute, -) -from .context import QueryContext as QueryContext -from .decl_api import ( - DeclarativeMeta as DeclarativeMeta, - as_declarative as as_declarative, - declarative_base as declarative_base, - declarative_mixin as declarative_mixin, - declared_attr as declared_attr, - has_inherited_table as has_inherited_table, - registry as registry, - synonym_for as synonym_for, -) -from .descriptor_props import CompositeProperty as CompositeProperty, SynonymProperty as SynonymProperty -from .dynamic import AppenderQuery as AppenderQuery -from .events import ( - AttributeEvents as AttributeEvents, - InstanceEvents as InstanceEvents, - InstrumentationEvents as InstrumentationEvents, - MapperEvents as MapperEvents, - QueryEvents as QueryEvents, - SessionEvents as SessionEvents, -) -from .identity import IdentityMap as IdentityMap -from .instrumentation import ClassManager as ClassManager -from .interfaces import ( - EXT_CONTINUE as EXT_CONTINUE, - EXT_SKIP as EXT_SKIP, - EXT_STOP as EXT_STOP, - MANYTOMANY as MANYTOMANY, - MANYTOONE as MANYTOONE, - NOT_EXTENSION as NOT_EXTENSION, - ONETOMANY as ONETOMANY, - InspectionAttr as InspectionAttr, - InspectionAttrInfo as InspectionAttrInfo, - MapperProperty as MapperProperty, - PropComparator as PropComparator, - UserDefinedOption as UserDefinedOption, -) -from .loading import merge_frozen_result as merge_frozen_result, merge_result as merge_result -from .mapper import ( - Mapper as Mapper, - class_mapper as class_mapper, - configure_mappers as configure_mappers, - reconstructor as reconstructor, - validates as validates, -) -from .properties import ColumnProperty as ColumnProperty -from .query import AliasOption as AliasOption, FromStatement as FromStatement, Query as Query -from .relationships import RelationshipProperty as RelationshipProperty, foreign as foreign, remote as remote -from .scoping import scoped_session as scoped_session -from .session import ( - ORMExecuteState as ORMExecuteState, - Session as Session, - SessionTransaction as SessionTransaction, - close_all_sessions as close_all_sessions, - make_transient as make_transient, - make_transient_to_detached as make_transient_to_detached, - object_session as object_session, - sessionmaker as sessionmaker, -) -from .state import AttributeState as AttributeState, InstanceState as InstanceState -from .strategy_options import Load as Load -from .unitofwork import UOWTransaction as UOWTransaction -from .util import ( - Bundle as Bundle, - CascadeOptions as CascadeOptions, - LoaderCriteriaOption as LoaderCriteriaOption, - 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, -) - -def create_session(bind: Incomplete | None = None, **kwargs): ... - -with_loader_criteria: Any -relationship: Any - -def relation(*arg, **kw): ... -def dynamic_loader(argument, **kw): ... - -column_property: Any -composite: Any - -def backref(name, **kwargs): ... -def deferred(*columns, **kw): ... -def query_expression(default_expr=...): ... - -mapper: Any -synonym: Any - -def clear_mappers() -> None: ... - -joinedload: Any -contains_eager: Any -defer: Any -undefer: Any -undefer_group: Any -with_expression: Any -load_only: Any -lazyload: Any -subqueryload: Any -selectinload: Any -immediateload: Any -noload: Any -raiseload: Any -defaultload: Any -selectin_polymorphic: Any - -def eagerload(*args, **kwargs): ... - -contains_alias: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi deleted file mode 100644 index c5097d7c825a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi +++ /dev/null @@ -1,286 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, NamedTuple, TypeVar - -from ..sql import base as sql_base, roles, traversals -from ..util.langhelpers import memoized_property -from . import interfaces -from .base import ( - ATTR_EMPTY as ATTR_EMPTY, - ATTR_WAS_SET as ATTR_WAS_SET, - CALLABLES_OK as CALLABLES_OK, - DEFERRED_HISTORY_LOAD as DEFERRED_HISTORY_LOAD, - INIT_OK as INIT_OK, - LOAD_AGAINST_COMMITTED as LOAD_AGAINST_COMMITTED, - NEVER_SET as NEVER_SET, - NO_AUTOFLUSH as NO_AUTOFLUSH, - NO_CHANGE as NO_CHANGE, - NO_RAISE as NO_RAISE, - NO_VALUE as NO_VALUE, - NON_PERSISTENT_OK as NON_PERSISTENT_OK, - PASSIVE_CLASS_MISMATCH as PASSIVE_CLASS_MISMATCH, - PASSIVE_NO_FETCH as PASSIVE_NO_FETCH, - PASSIVE_NO_FETCH_RELATED as PASSIVE_NO_FETCH_RELATED, - PASSIVE_NO_INITIALIZE as PASSIVE_NO_INITIALIZE, - PASSIVE_NO_RESULT as PASSIVE_NO_RESULT, - PASSIVE_OFF as PASSIVE_OFF, - PASSIVE_ONLY_PERSISTENT as PASSIVE_ONLY_PERSISTENT, - PASSIVE_RETURN_NO_VALUE as PASSIVE_RETURN_NO_VALUE, - RELATED_OBJECT_OK as RELATED_OBJECT_OK, - SQL_OK as SQL_OK, - instance_dict as instance_dict, - instance_state as instance_state, -) - -_T = TypeVar("_T") - -class NoKey(str): ... - -NO_KEY: Any - -class QueryableAttribute( - interfaces._MappedAttribute, - interfaces.InspectionAttr, - interfaces.PropComparator[Any], - traversals.HasCopyInternals, - roles.JoinTargetRole, - roles.OnClauseRole, - sql_base.Immutable, - sql_base.MemoizedHasCacheKey, -): - is_attribute: bool - __visit_name__: str - class_: Any - key: Any - impl: Any - comparator: Any - dispatch: Incomplete - def __init__( - self, - class_, - key, - parententity, - impl: Incomplete | None = None, - comparator: Incomplete | None = None, - of_type: Incomplete | None = None, - extra_criteria=(), - ) -> None: ... - def __reduce__(self): ... - def get_history(self, instance, passive=...): ... - @memoized_property - def info(self): ... - @memoized_property - def parent(self): ... - @memoized_property - def expression(self): ... - def __clause_element__(self): ... - def adapt_to_entity(self, adapt_to_entity): ... - def of_type(self, entity): ... - def and_(self, *other): ... - def label(self, name): ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... - def hasparent(self, state, optimistic: bool = False): ... - def __getattr__(self, key: str): ... - @memoized_property - def property(self): ... - -class Mapped(QueryableAttribute, Generic[_T]): - def __get__(self, instance, owner) -> None: ... - def __set__(self, instance, value) -> None: ... - def __delete__(self, instance) -> None: ... - -class InstrumentedAttribute(Mapped[Any]): - inherit_cache: bool - def __set__(self, instance, value) -> None: ... - def __delete__(self, instance) -> None: ... - def __get__(self, instance, owner): ... - -class _HasEntityNamespace(NamedTuple): - entity_namespace: Any - -class HasEntityNamespace(_HasEntityNamespace): - is_mapper: bool - is_aliased_class: bool - -def create_proxied_attribute(descriptor): ... - -OP_REMOVE: Any -OP_APPEND: Any -OP_REPLACE: Any -OP_BULK_REPLACE: Any -OP_MODIFIED: Any - -class AttributeEvent: - impl: Any - op: Any - parent_token: Any - def __init__(self, attribute_impl, op) -> None: ... - def __eq__(self, other): ... - @property - def key(self): ... - def hasparent(self, state): ... - -Event = AttributeEvent - -class AttributeImpl: - class_: Any - key: Any - callable_: Any - dispatch: Any - trackparent: Any - parent_token: Any - send_modified_events: Any - is_equal: Any - accepts_scalar_loader: Any - load_on_unexpire: Any - def __init__( - self, - class_, - key, - callable_, - dispatch, - trackparent: bool = False, - compare_function: Incomplete | None = None, - active_history: bool = False, - parent_token: Incomplete | None = None, - load_on_unexpire: bool = True, - send_modified_events: bool = True, - accepts_scalar_loader: Incomplete | None = None, - **kwargs, - ) -> None: ... - active_history: Any - def hasparent(self, state, optimistic: bool = False): ... - def sethasparent(self, state, parent_state, value) -> None: ... - def get_history(self, state, dict_, passive=...) -> None: ... - def get_all_pending(self, state, dict_, passive=...) -> None: ... - def get(self, state, dict_, passive=...): ... - def append(self, state, dict_, value, initiator, passive=...) -> None: ... - def remove(self, state, dict_, value, initiator, passive=...) -> None: ... - def pop(self, state, dict_, value, initiator, passive=...) -> None: ... - def set( - self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = None, pop: bool = False - ) -> None: ... - def get_committed_value(self, state, dict_, passive=...): ... - def set_committed_value(self, state, dict_, value): ... - -class ScalarAttributeImpl(AttributeImpl): - default_accepts_scalar_loader: bool - uses_objects: bool - supports_population: bool - collection: bool - dynamic: bool - def __init__(self, *arg, **kw) -> None: ... - def delete(self, state, dict_) -> None: ... - def get_history(self, state, dict_, passive=...): ... - def set( - self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = None, pop: bool = False - ) -> None: ... - def fire_replace_event(self, state, dict_, value, previous, initiator): ... - def fire_remove_event(self, state, dict_, value, initiator) -> None: ... - @property - def type(self) -> None: ... - -class ScalarObjectAttributeImpl(ScalarAttributeImpl): - default_accepts_scalar_loader: bool - uses_objects: bool - supports_population: bool - collection: bool - def delete(self, state, dict_) -> None: ... - def get_history(self, state, dict_, passive=...): ... - def get_all_pending(self, state, dict_, passive=...): ... - def set( - self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = None, pop: bool = False - ) -> None: ... - def fire_remove_event(self, state, dict_, value, initiator) -> None: ... - def fire_replace_event(self, state, dict_, value, previous, initiator): ... - -class CollectionAttributeImpl(AttributeImpl): - default_accepts_scalar_loader: bool - uses_objects: bool - supports_population: bool - collection: bool - dynamic: bool - copy: Any - collection_factory: Any - def __init__( - self, - class_, - key, - callable_, - dispatch, - typecallable: Incomplete | None = None, - trackparent: bool = False, - copy_function: Incomplete | None = None, - compare_function: Incomplete | None = None, - **kwargs, - ) -> None: ... - def get_history(self, state, dict_, passive=...): ... - def get_all_pending(self, state, dict_, passive=...): ... - def fire_append_event(self, state, dict_, value, initiator): ... - def fire_append_wo_mutation_event(self, state, dict_, value, initiator): ... - def fire_pre_remove_event(self, state, dict_, initiator) -> None: ... - def fire_remove_event(self, state, dict_, value, initiator) -> None: ... - def delete(self, state, dict_) -> None: ... - def append(self, state, dict_, value, initiator, passive=...) -> None: ... - def remove(self, state, dict_, value, initiator, passive=...) -> None: ... - def pop(self, state, dict_, value, initiator, passive=...) -> None: ... - def set( - self, - state, - dict_, - value, - initiator: Incomplete | None = None, - passive=..., - check_old: Incomplete | None = None, - pop: bool = False, - _adapt: bool = True, - ) -> None: ... - def set_committed_value(self, state, dict_, value): ... - def get_collection(self, state, dict_, user_data: Incomplete | None = None, passive=...): ... - -def backref_listeners(attribute, key, uselist): ... - -class History: - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - 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, original=...): ... - @classmethod - def from_collection(cls, attribute, state, current): ... - -HISTORY_BLANK: Any - -def get_history(obj, key, passive=...): ... -def get_state_history(state, key, passive=...): ... -def has_parent(cls, obj, key, optimistic: bool = False): ... -def register_attribute(class_, key, **kw): ... -def register_attribute_impl( - class_, - key, - uselist: bool = False, - callable_: Incomplete | None = None, - useobject: bool = False, - impl_class: Incomplete | None = None, - backref: Incomplete | None = None, - **kw, -): ... -def register_descriptor( - class_, key, comparator: Incomplete | None = None, parententity: Incomplete | None = None, doc: Incomplete | None = None -): ... -def unregister_attribute(class_, key) -> None: ... -def init_collection(obj, key): ... -def init_state_collection(state, dict_, key): ... -def set_committed_value(instance, key, value) -> None: ... -def set_attribute(instance, key, value, initiator: Incomplete | None = None) -> None: ... -def get_attribute(instance, key): ... -def del_attribute(instance, key) -> None: ... -def flag_modified(instance, key) -> None: ... -def flag_dirty(instance) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi deleted file mode 100644 index f6e4a73b47cd..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any - -from ..util.langhelpers import memoized_property - -PASSIVE_NO_RESULT: Any -PASSIVE_CLASS_MISMATCH: Any -ATTR_WAS_SET: Any -ATTR_EMPTY: Any -NO_VALUE: Any -NEVER_SET: Any -NO_CHANGE: Any -CALLABLES_OK: Any -SQL_OK: Any -RELATED_OBJECT_OK: Any -INIT_OK: Any -NON_PERSISTENT_OK: Any -LOAD_AGAINST_COMMITTED: Any -NO_AUTOFLUSH: Any -NO_RAISE: Any -DEFERRED_HISTORY_LOAD: Any -PASSIVE_OFF: Any -PASSIVE_RETURN_NO_VALUE: Any -PASSIVE_NO_INITIALIZE: Any -PASSIVE_NO_FETCH: Any -PASSIVE_NO_FETCH_RELATED: Any -PASSIVE_ONLY_PERSISTENT: Any -PASSIVE_MERGE: Any -DEFAULT_MANAGER_ATTR: str -DEFAULT_STATE_ATTR: str -EXT_CONTINUE: Any -EXT_STOP: Any -EXT_SKIP: Any -ONETOMANY: Any -MANYTOONE: Any -MANYTOMANY: Any -NOT_EXTENSION: Any - -_never_set: frozenset[Any] -_none_set: frozenset[Any] - -def manager_of_class(cls): ... - -instance_state: Any -instance_dict: 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_to_mapper(class_or_mapper): ... -def _mapper_or_none(entity): ... -def _is_mapped_class(entity): ... - -_state_mapper: Any - -def class_mapper(class_, configure: bool = True): ... - -class InspectionAttr: - is_selectable: bool - is_aliased_class: bool - is_instance: bool - is_mapper: bool - is_bundle: bool - is_property: bool - is_attribute: bool - is_clause_element: bool - extension_type: Any - -class InspectionAttrInfo(InspectionAttr): - @memoized_property - def info(self): ... - -class _MappedAttribute: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi deleted file mode 100644 index 129b82fbbc6f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi +++ /dev/null @@ -1,52 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def add_class(classname, cls, decl_class_registry) -> None: ... -def remove_class(classname, cls, decl_class_registry) -> None: ... - -class _MultipleClassMarker: - on_remove: Any - contents: Any - def __init__(self, classes, on_remove: Incomplete | None = None) -> None: ... - def remove_item(self, cls) -> None: ... - def __iter__(self): ... - def attempt_get(self, path, key): ... - def add_item(self, item) -> None: ... - -class _ModuleMarker: - parent: Any - name: Any - contents: Any - mod_ns: Any - path: 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): ... - def remove_class(self, name, cls) -> None: ... - -class _ModNS: - def __init__(self, parent) -> None: ... - def __getattr__(self, key: str): ... - -class _GetColumns: - cls: Any - def __init__(self, cls) -> None: ... - def __getattr__(self, key: str): ... - -class _GetTable: - key: Any - metadata: Any - def __init__(self, key, metadata) -> None: ... - def __getattr__(self, key: str): ... - -class _class_resolver: - cls: Any - prop: Any - arg: Any - fallback: Any - favor_tables: Any - def __init__(self, cls, prop, fallback, arg, favor_tables: bool = False) -> None: ... - def __call__(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi deleted file mode 100644 index 91d88b539fb2..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi +++ /dev/null @@ -1,130 +0,0 @@ -from _typeshed import Incomplete, SupportsKeysAndGetItem -from collections.abc import Iterable -from typing import Any, TypeVar, overload -from typing_extensions import Literal, SupportsIndex - -from ..orm.attributes import Event -from ..util.langhelpers import _symbol, symbol - -_T = TypeVar("_T") -_KT = TypeVar("_KT") -_VT = TypeVar("_VT") - -class _PlainColumnGetter: - cols: Any - composite: Any - def __init__(self, cols) -> None: ... - def __reduce__(self): ... - def __call__(self, value): ... - -class _SerializableColumnGetter: - colkeys: Any - composite: Any - def __init__(self, colkeys) -> None: ... - def __reduce__(self): ... - def __call__(self, value): ... - -class _SerializableColumnGetterV2(_PlainColumnGetter): - colkeys: Any - composite: Any - def __init__(self, colkeys) -> None: ... - def __reduce__(self): ... - -def column_mapped_collection(mapping_spec): ... - -class _SerializableAttrGetter: - name: Any - getter: 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 converter(fn): ... - @staticmethod - def adds(arg): ... - @staticmethod - def replaces(arg): ... - @staticmethod - def removes(arg): ... - @staticmethod - def removes_return(): ... - -collection_adapter: Any - -class CollectionAdapter: - attr: Any - owner_state: Any - invalidated: bool - empty: bool - def __init__(self, attr, owner_state, data) -> None: ... - @property - def data(self): ... - def bulk_appender(self): ... - def append_with_event(self, item, initiator: Incomplete | None = None) -> None: ... - def append_without_event(self, item) -> None: ... - def append_multiple_without_event(self, items) -> None: ... - def bulk_remover(self): ... - def remove_with_event(self, item, initiator: Incomplete | None = None) -> None: ... - def remove_without_event(self, item) -> None: ... - def clear_with_event(self, initiator: Incomplete | None = None) -> None: ... - def clear_without_event(self) -> None: ... - def __iter__(self): ... - def __len__(self) -> int: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - def fire_append_wo_mutation_event(self, item, initiator: Incomplete | None = None): ... - def fire_append_event(self, item, initiator: Incomplete | None = None): ... - def fire_remove_event(self, item, initiator: Incomplete | None = None) -> None: ... - def fire_pre_remove_event(self, initiator: Incomplete | None = None) -> None: ... - -class InstrumentedList(list[_T]): - def append(self, item, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - def clear(self, index: SupportsIndex = -1) -> None: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def insert(self, index: SupportsIndex, value: _T) -> None: ... - def pop(self, index: SupportsIndex = -1) -> _T: ... - def remove(self, value: _T, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - -class InstrumentedSet(set[_T]): - def add(self, value: _T, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - def difference_update(self, value: Iterable[_T]) -> None: ... # type: ignore[override] - def discard(self, value: _T, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - def intersection_update(self, other: Iterable[_T]) -> None: ... # type: ignore[override] - def remove(self, value: _T, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - def symmetric_difference_update(self, other: Iterable[_T]) -> None: ... - def update(self, value: Iterable[_T]) -> None: ... # type: ignore[override] - -class InstrumentedDict(dict[_KT, _VT]): ... - -class MappedCollection(dict[_KT, _VT]): - keyfunc: Any - def __init__(self, keyfunc) -> None: ... - def set(self, value: _VT, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - def remove(self, value: _VT, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - def __delitem__(self, key: _KT, _sa_initiatorEvent: Event | Literal[False] | None = None) -> None: ... - def __setitem__(self, key: _KT, value: _VT, _sa_initiator: Event | Literal[False] | None = None) -> None: ... - @overload - def pop(self, key: _KT) -> _VT: ... - @overload - def pop(self, key: _KT, default: _VT | _T | _symbol | symbol = ...) -> _VT | _T: ... - @overload # type: ignore[override] - def setdefault(self, key: _KT, default: _T) -> _VT | _T: ... - @overload - def setdefault(self, key: _KT, default: None = None) -> _VT | None: ... - @overload - def update(self, __other: SupportsKeysAndGetItem[_KT, _VT] = ..., **kwargs: _VT) -> None: ... - @overload - def update(self, __other: Iterable[tuple[_KT, _VT]] = ..., **kwargs: _VT) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi deleted file mode 100644 index 1e3a3e618a5a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi +++ /dev/null @@ -1,213 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..sql.base import CacheableOptions, CompileState, Options -from ..sql.selectable import SelectState - -LABEL_STYLE_LEGACY_ORM: Any - -class QueryContext: - class default_load_options(Options): ... - load_options: Any - execution_options: Any - bind_arguments: Any - compile_state: Any - query: Any - session: Any - loaders_require_buffering: bool - loaders_require_uniquing: bool - params: Any - create_eager_joins: Any - propagated_loader_options: Any - attributes: Any - runid: Any - partials: Any - post_load_paths: Any - autoflush: Any - populate_existing: Any - invoke_all_eagers: Any - version_check: Any - refresh_state: Any - yield_per: Any - identity_token: Any - def __init__( - self, - compile_state, - statement, - params, - session, - load_options, - execution_options: Incomplete | None = None, - bind_arguments: Incomplete | None = None, - ) -> None: ... - -class ORMCompileState(CompileState): - class default_compile_options(CacheableOptions): ... - current_path: Any - def __init__(self, *arg, **kw) -> None: ... - @classmethod - def create_for_statement(cls, statement_container, compiler, **kw) -> None: ... # type: ignore[override] - @classmethod - def get_column_descriptions(cls, statement): ... - @classmethod - def orm_pre_session_exec(cls, session, statement, params, execution_options, bind_arguments, is_reentrant_invoke): ... - @classmethod - def orm_setup_cursor_result(cls, session, statement, params, execution_options, bind_arguments, result): ... - -class ORMFromStatementCompileState(ORMCompileState): - multi_row_eager_loaders: bool - eager_adding_joins: bool - compound_eager_adapter: Any - extra_criteria_entities: Any - eager_joins: Any - use_legacy_query_style: Any - statement_container: Any - requested_statement: Any - dml_table: Any - compile_options: Any - statement: Any - current_path: Any - attributes: Any - global_attributes: Any - primary_columns: Any - secondary_columns: Any - dedupe_columns: Any - create_eager_joins: Any - order_by: Any - @classmethod - def create_for_statement(cls, statement_container, compiler, **kw): ... - -class ORMSelectCompileState(ORMCompileState, SelectState): - multi_row_eager_loaders: bool - eager_adding_joins: bool - compound_eager_adapter: Any - correlate: Any - correlate_except: Any - global_attributes: Any - select_statement: Any - for_statement: Any - use_legacy_query_style: Any - compile_options: Any - label_style: Any - current_path: Any - eager_order_by: Any - attributes: Any - primary_columns: Any - secondary_columns: Any - dedupe_columns: Any - eager_joins: Any - extra_criteria_entities: Any - create_eager_joins: Any - from_clauses: Any - @classmethod - def create_for_statement(cls, statement, compiler, **kw): ... - @classmethod - def determine_last_joined_entity(cls, statement): ... - @classmethod - def all_selected_columns(cls, statement) -> None: ... - @classmethod - def get_columns_clause_froms(cls, statement): ... - @classmethod - def from_statement(cls, statement, from_statement): ... - -class _QueryEntity: - use_id_for_hash: bool - @classmethod - def to_compile_state(cls, compile_state, entities, entities_collection, is_current_entities): ... - -class _MapperEntity(_QueryEntity): - expr: Any - mapper: Any - entity_zero: Any - is_aliased_class: Any - path: Any - selectable: Any - def __init__(self, compile_state, entity, entities_collection, is_current_entities) -> None: ... - supports_single_entity: bool - use_id_for_hash: bool - @property - def type(self): ... - @property - def entity_zero_or_selectable(self): ... - def corresponds_to(self, entity): ... - def row_processor(self, context, result): ... - def setup_compile_state(self, compile_state) -> None: ... - -class _BundleEntity(_QueryEntity): - bundle: Any - expr: Any - type: Any - supports_single_entity: Any - def __init__( - self, - compile_state, - expr, - entities_collection, - is_current_entities: bool, - setup_entities: bool = True, - parent_bundle: Incomplete | None = None, - ) -> None: ... - @property - def mapper(self): ... - @property - def entity_zero(self): ... - def corresponds_to(self, entity): ... - @property - def entity_zero_or_selectable(self): ... - def setup_compile_state(self, compile_state) -> None: ... - def row_processor(self, context, result): ... - -class _ColumnEntity(_QueryEntity): - raw_column_index: Any - translate_raw_column: Any - @property - def type(self): ... - def row_processor(self, context, result): ... - -class _RawColumnEntity(_ColumnEntity): - entity_zero: Any - mapper: Any - supports_single_entity: bool - expr: Any - raw_column_index: Any - translate_raw_column: Any - column: Any - entity_zero_or_selectable: Any - def __init__( - self, - compile_state, - column, - entities_collection, - raw_column_index, - is_current_entities: bool, - parent_bundle: Incomplete | None = None, - ) -> None: ... - def corresponds_to(self, entity): ... - def setup_compile_state(self, compile_state) -> None: ... - -class _ORMColumnEntity(_ColumnEntity): - supports_single_entity: bool - expr: Any - translate_raw_column: bool - raw_column_index: Any - entity_zero_or_selectable: Any - entity_zero: Any - mapper: Any - column: Any - def __init__( - self, - compile_state, - column, - entities_collection, - parententity, - raw_column_index, - is_current_entities: bool, - parent_bundle: Incomplete | None = None, - ) -> None: ... - def corresponds_to(self, entity): ... - def setup_compile_state(self, compile_state) -> None: ... - -class _IdentityTokenEntity(_ORMColumnEntity): - translate_raw_column: bool - def setup_compile_state(self, compile_state) -> None: ... - def row_processor(self, context, result): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi deleted file mode 100644 index 55ebd2b52c7e..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi +++ /dev/null @@ -1,146 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from typing import Any, ClassVar, TypeVar, overload -from typing_extensions import TypeAlias - -from ..engine.interfaces import Connectable -from ..sql.schema import MetaData -from ..util.langhelpers import hybridproperty -from . import interfaces - -_ClsT = TypeVar("_ClsT", bound=type[Any]) -_DeclT = TypeVar("_DeclT", bound=type[_DeclarativeBase]) - -# Dynamic class as created by registry.generate_base() via DeclarativeMeta -# or another metaclass. This class does not exist at runtime. -class _DeclarativeBase(Any): # type: ignore[misc] # super classes are dynamic - registry: ClassVar[registry] - metadata: ClassVar[MetaData] - __abstract__: ClassVar[bool] - # not always existing: - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - __mapper_cls__: ClassVar[Any] - __class_getitem__: ClassVar[Any] - -# Meta class (or function) that creates a _DeclarativeBase class. -_DeclarativeBaseMeta: TypeAlias = Callable[[str, tuple[type[Any], ...], dict[str, Any]], _DeclT] - -def has_inherited_table(cls: type[Any]) -> bool: ... - -class DeclarativeMeta(type): - def __init__(cls, classname: str, bases: tuple[type[Any], ...], dict_: dict[str, Any], **kw: Unused) -> None: ... - def __setattr__(cls, key: str, value: Any) -> None: ... - def __delattr__(cls, key: str) -> None: ... - -def synonym_for(name, map_column: bool = False): ... - -class declared_attr(interfaces._MappedAttribute, property): - def __init__(self, fget, cascading: bool = False) -> None: ... - def __get__(self, self_, cls): ... - @hybridproperty - def cascading(self): ... - -class _stateful_declared_attr(declared_attr): - kw: Any - def __init__(self, **kw) -> None: ... - def __call__(self, fn): ... - -def declarative_mixin(cls: _ClsT) -> _ClsT: ... -@overload -def declarative_base( - bind: Connectable | None = None, - metadata: MetaData | None = None, - mapper: Incomplete | None = None, - cls: type[Any] | tuple[type[Any], ...] = ..., - name: str = "Base", - constructor: Callable[..., None] = ..., - class_registry: dict[str, type[Any]] | None = None, -) -> type[_DeclarativeBase]: ... -@overload -def declarative_base( - bind: Connectable | None = None, - metadata: MetaData | None = None, - mapper: Incomplete | None = None, - cls: type[Any] | tuple[type[Any], ...] = ..., - name: str = "Base", - constructor: Callable[..., None] = ..., - class_registry: dict[str, type[Any]] | None = None, - *, - metaclass: _DeclarativeBaseMeta[_DeclT], -) -> _DeclT: ... -@overload -def declarative_base( - bind: Connectable | None, - metadata: MetaData | None, - mapper: Incomplete | None, - cls: type[Any] | tuple[type[Any], ...], - name: str, - constructor: Callable[..., None], - class_registry: dict[str, type[Any]] | None, - metaclass: _DeclarativeBaseMeta[_DeclT], -) -> _DeclT: ... - -class registry: - metadata: MetaData - constructor: Callable[..., None] - def __init__( - self, - metadata: MetaData | None = None, - class_registry: dict[str, type[Any]] | None = None, - constructor: Callable[..., None] = ..., - _bind: Connectable | None = None, - ) -> None: ... - @property - def mappers(self) -> frozenset[Any]: ... - def configure(self, cascade: bool = False) -> None: ... - def dispose(self, cascade: bool = False) -> None: ... - @overload - def generate_base( - self, mapper: Incomplete | None = None, cls: type[Any] | tuple[type[Any], ...] = ..., name: str = "Base" - ) -> type[_DeclarativeBase]: ... - @overload - def generate_base( - self, - mapper: Incomplete | None = None, - cls: type[Any] | tuple[type[Any], ...] = ..., - name: str = "Base", - *, - metaclass: _DeclarativeBaseMeta[_DeclT], - ) -> _DeclT: ... - @overload - def generate_base( - self, - mapper: Incomplete | None, - cls: type[Any] | tuple[type[Any], ...], - name: str, - metaclass: _DeclarativeBaseMeta[_DeclT], - ) -> type[_DeclarativeBase]: ... - def mapped(self, cls: _ClsT) -> _ClsT: ... - # Return type of the callable is a _DeclarativeBase class with the passed in class as base. - # This could be better approximated with Intersection[PassedInClass, _DeclarativeBase]. - @overload - def as_declarative_base(self, *, mapper: Incomplete | None = ...) -> Callable[[_ClsT], _ClsT | DeclarativeMeta | Any]: ... - @overload - def as_declarative_base( - self, *, mapper: Incomplete | None = ..., metaclass: _DeclarativeBaseMeta[_DeclT] - ) -> Callable[[_ClsT], _ClsT | _DeclT | Any]: ... - def map_declaratively(self, cls): ... - def map_imperatively(self, class_, local_table: Incomplete | None = None, **kw): ... - -@overload -def as_declarative( - *, - bind: Connectable | None = ..., - metadata: MetaData | None = ..., - class_registry: dict[str, type[Any]] | None = ..., - mapper: Incomplete | None = ..., -) -> Callable[[_ClsT], _ClsT | DeclarativeMeta | Any]: ... -@overload -def as_declarative( - *, - bind: Connectable | None = ..., - metadata: MetaData | None = ..., - class_registry: dict[str, type[Any]] | None = ..., - mapper: Incomplete | None = ..., - metaclass: _DeclarativeBaseMeta[_DeclT], -) -> Callable[[_ClsT], _ClsT | _DeclT | Any]: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi deleted file mode 100644 index 7aab93cf9046..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi +++ /dev/null @@ -1,47 +0,0 @@ -from typing import Any - -class _MapperConfig: - @classmethod - def setup_mapping(cls, registry, cls_, dict_, table, mapper_kw): ... - cls: Any - classname: Any - properties: Any - declared_attr_reg: Any - def __init__(self, registry, cls_, mapper_kw) -> None: ... - def set_cls_attribute(self, attrname, value): ... - -class _ImperativeMapperConfig(_MapperConfig): - dict_: Any - local_table: Any - inherits: Any - def __init__(self, registry, cls_, table, mapper_kw) -> None: ... - def map(self, mapper_kw=...): ... - -class _ClassScanMapperConfig(_MapperConfig): - dict_: Any - local_table: Any - persist_selectable: Any - declared_columns: Any - column_copies: Any - table_args: Any - tablename: Any - mapper_args: Any - mapper_args_fn: Any - inherits: Any - def __init__(self, registry, cls_, dict_, table, mapper_kw) -> None: ... - def map(self, mapper_kw=...): ... - -class _DeferredMapperConfig(_ClassScanMapperConfig): - @property - def cls(self): ... - @cls.setter - def cls(self, class_) -> None: ... - @classmethod - def has_cls(cls, class_): ... - @classmethod - def raise_unmapped_for_cls(cls, class_) -> None: ... - @classmethod - def config_for_cls(cls, class_): ... - @classmethod - def classes_for_base(cls, base_cls, sort: bool = True): ... - def map(self, mapper_kw=...): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/dependency.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/dependency.pyi deleted file mode 100644 index 8fe92087dc7e..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/dependency.pyi +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any - -class DependencyProcessor: - prop: Any - cascade: Any - mapper: Any - parent: Any - secondary: Any - direction: Any - post_update: Any - passive_deletes: Any - passive_updates: Any - enable_typechecks: Any - sort_key: Any - key: Any - def __init__(self, prop) -> None: ... - @classmethod - def from_relationship(cls, prop): ... - def hasparent(self, state): ... - def per_property_preprocessors(self, uow) -> None: ... - def per_property_flush_actions(self, uow) -> None: ... - def per_state_flush_actions(self, uow, states, isdelete) -> None: ... - def presort_deletes(self, uowcommit, states): ... - def presort_saves(self, uowcommit, states): ... - def process_deletes(self, uowcommit, states) -> None: ... - def process_saves(self, uowcommit, states) -> None: ... - 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 - ) -> None: ... - def per_state_dependencies( - self, uow, save_parent, delete_parent, child_action, after_save, before_delete, isdelete, childisdelete - ) -> None: ... - def presort_deletes(self, uowcommit, states) -> None: ... - def presort_saves(self, uowcommit, states) -> None: ... - def process_deletes(self, uowcommit, states) -> None: ... - def process_saves(self, uowcommit, states) -> None: ... - -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 - ) -> None: ... - def per_state_dependencies( - self, uow, save_parent, delete_parent, child_action, after_save, before_delete, isdelete, childisdelete - ) -> None: ... - def presort_deletes(self, uowcommit, states) -> None: ... - def presort_saves(self, uowcommit, states) -> None: ... - def process_deletes(self, uowcommit, states) -> None: ... - def process_saves(self, uowcommit, states) -> None: ... - -class DetectKeySwitch(DependencyProcessor): - def per_property_preprocessors(self, uow) -> None: ... - def per_property_flush_actions(self, uow) -> None: ... - def per_state_flush_actions(self, uow, states, isdelete) -> None: ... - def presort_deletes(self, uowcommit, states) -> None: ... - def presort_saves(self, uow, states) -> None: ... - def prop_has_changes(self, uow, states, isdelete): ... - def process_deletes(self, uowcommit, states) -> None: ... - def process_saves(self, uowcommit, states) -> None: ... - -class ManyToManyDP(DependencyProcessor): - def per_property_dependencies( - self, uow, parent_saves, child_saves, parent_deletes, child_deletes, after_save, before_delete - ) -> None: ... - def per_state_dependencies( - self, uow, save_parent, delete_parent, child_action, after_save, before_delete, isdelete, childisdelete - ) -> None: ... - def presort_deletes(self, uowcommit, states) -> None: ... - def presort_saves(self, uowcommit, states) -> None: ... - def process_deletes(self, uowcommit, states) -> None: ... - def process_saves(self, uowcommit, states) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi deleted file mode 100644 index bf249bc257ac..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi +++ /dev/null @@ -1,74 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, ClassVar, Generic, TypeVar - -from ..sql.operators import ColumnOperators -from ..util.langhelpers import memoized_property -from . import util as orm_util -from .interfaces import MapperProperty, PropComparator - -_T = TypeVar("_T") - -class DescriptorProperty(MapperProperty): - doc: Any - uses_objects: bool - key: Any - descriptor: Any - def instrument_class(self, mapper): ... - -class CompositeProperty(DescriptorProperty): - attrs: Any - composite_class: Any - active_history: Any - deferred: Any - group: Any - comparator_factory: Any - info: Any - def __init__(self, class_, *attrs, **kwargs) -> None: ... - def instrument_class(self, mapper) -> None: ... - def do_init(self) -> None: ... - @memoized_property - def props(self): ... - @property - def columns(self): ... - def get_history(self, state, dict_, passive=...): ... - - class CompositeBundle(orm_util.Bundle): - property: Any - def __init__(self, property_, expr) -> None: ... - def create_row_processor(self, query, procs, labels): ... - - class Comparator(PropComparator[_T], Generic[_T]): - __hash__: ClassVar[None] # type: ignore[assignment] - @memoized_property - def clauses(self): ... - def __clause_element__(self): ... - @memoized_property - def expression(self): ... - def __eq__(self, other) -> ColumnOperators[_T]: ... # type: ignore[override] - def __ne__(self, other) -> ColumnOperators[_T]: ... # type: ignore[override] - -class ConcreteInheritedProperty(DescriptorProperty): - descriptor: Any - def __init__(self): ... - -class SynonymProperty(DescriptorProperty): - name: Any - map_column: Any - descriptor: Any - comparator_factory: Any - doc: Any - info: Any - def __init__( - self, - name, - map_column: Incomplete | None = None, - descriptor: Incomplete | None = None, - comparator_factory: Incomplete | None = None, - doc: Incomplete | None = None, - info: Incomplete | None = None, - ) -> None: ... - @property - def uses_objects(self): ... - def get_history(self, *arg, **kw): ... - parent: Any - def set_parent(self, parent, init) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi deleted file mode 100644 index 6008d1d9f04a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi +++ /dev/null @@ -1,85 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, TypeVar - -from . import attributes, strategies -from .query import Query - -_T = TypeVar("_T") - -class DynaLoader(strategies.AbstractRelationshipLoader): - logger: Any - is_class_level: bool - def init_class_attribute(self, mapper) -> None: ... - -class DynamicAttributeImpl(attributes.AttributeImpl): - uses_objects: bool - default_accepts_scalar_loader: bool - supports_population: bool - collection: bool - dynamic: bool - order_by: Any - target_mapper: Any - query_class: Any - def __init__( - self, class_, key, typecallable, dispatch, target_mapper, order_by, query_class: Incomplete | None = None, **kw - ) -> None: ... - def get(self, state, dict_, passive=...): ... - def get_collection(self, state, dict_, user_data: Incomplete | None = None, passive=...): ... - def fire_append_event(self, state, dict_, value, initiator, collection_history: Incomplete | None = None) -> None: ... - def fire_remove_event(self, state, dict_, value, initiator, collection_history: Incomplete | None = None) -> None: ... - def set( - self, - state, - dict_, - value, - initiator: Incomplete | None = None, - passive=..., - check_old: Incomplete | None = None, - pop: bool = False, - _adapt: bool = True, - ) -> None: ... - def delete(self, *args, **kwargs) -> None: ... - def set_committed_value(self, state, dict_, value) -> None: ... - def get_history(self, state, dict_, passive=...): ... - def get_all_pending(self, state, dict_, passive=...): ... - def append(self, state, dict_, value, initiator, passive=...) -> None: ... - def remove(self, state, dict_, value, initiator, passive=...) -> None: ... - def pop(self, state, dict_, value, initiator, passive=...) -> None: ... - -class DynamicCollectionAdapter: - data: Any - def __init__(self, data) -> None: ... - def __iter__(self): ... - def __len__(self) -> int: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - -class AppenderMixin: - query_class: Any - instance: Any - attr: Any - def __init__(self, attr, state) -> None: ... - session: Any - def __getitem__(self, index): ... - def count(self): ... - def extend(self, iterator) -> None: ... - def append(self, item) -> None: ... - def remove(self, item) -> None: ... - -class AppenderQuery(AppenderMixin, Query[_T], Generic[_T]): ... - -def mixin_user_query(cls): ... - -class CollectionHistory: - unchanged_items: Any - added_items: Any - deleted_items: Any - def __init__(self, attr, state, apply_to: Incomplete | None = None) -> 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) -> None: ... - def add_removed(self, value) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi deleted file mode 100644 index 1e4cf1b01419..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi +++ /dev/null @@ -1,25 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..sql import operators - -class UnevaluatableError(Exception): ... - -class _NoObject(operators.ColumnOperators[Any]): - def operate(self, *arg, **kw) -> None: ... - def reverse_operate(self, *arg, **kw) -> None: ... - -class EvaluatorCompiler: - target_cls: Any - def __init__(self, target_cls: Incomplete | None = None) -> None: ... - def process(self, *clauses): ... - 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_tuple(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/stubs/SQLAlchemy/sqlalchemy/orm/events.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/events.pyi deleted file mode 100644 index 36a6414fce63..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/events.pyi +++ /dev/null @@ -1,104 +0,0 @@ -from typing import Any - -from .. import event - -class InstrumentationEvents(event.Events): - def class_instrument(self, cls) -> None: ... - def class_uninstrument(self, cls) -> None: ... - def attribute_instrument(self, cls, key, inst) -> None: ... - -class _InstrumentationEventsHold: - class_: Any - def __init__(self, class_) -> None: ... - dispatch: Any - -class InstanceEvents(event.Events): - def first_init(self, manager, cls) -> None: ... - def init(self, target, args, kwargs) -> None: ... - def init_failure(self, target, args, kwargs) -> None: ... - def load(self, target, context) -> None: ... - def refresh(self, target, context, attrs) -> None: ... - def refresh_flush(self, target, flush_context, attrs) -> None: ... - def expire(self, target, attrs) -> None: ... - def pickle(self, target, state_dict) -> None: ... - def unpickle(self, target, state_dict) -> None: ... - -class _EventsHold(event.RefCollection): - class_: Any - def __init__(self, class_) -> None: ... - - class HoldEvents: ... - - def remove(self, event_key) -> None: ... - @classmethod - def populate(cls, class_, subject) -> None: ... - -class _InstanceEventsHold(_EventsHold): - all_holds: Any - def resolve(self, class_): ... - - class HoldInstanceEvents(_EventsHold.HoldEvents, InstanceEvents): ... - dispatch: Any - -class MapperEvents(event.Events): - def instrument_class(self, mapper, class_) -> None: ... - def before_mapper_configured(self, mapper, class_) -> None: ... - def mapper_configured(self, mapper, class_) -> None: ... - def before_configured(self) -> None: ... - def after_configured(self) -> None: ... - def before_insert(self, mapper, connection, target) -> None: ... - def after_insert(self, mapper, connection, target) -> None: ... - def before_update(self, mapper, connection, target) -> None: ... - def after_update(self, mapper, connection, target) -> None: ... - def before_delete(self, mapper, connection, target) -> None: ... - def after_delete(self, mapper, connection, target) -> None: ... - -class _MapperEventsHold(_EventsHold): - all_holds: Any - def resolve(self, class_): ... - - class HoldMapperEvents(_EventsHold.HoldEvents, MapperEvents): ... - dispatch: Any - -class SessionEvents(event.Events): - def do_orm_execute(self, orm_execute_state) -> None: ... - def after_transaction_create(self, session, transaction) -> None: ... - def after_transaction_end(self, session, transaction) -> None: ... - def before_commit(self, session) -> None: ... - def after_commit(self, session) -> None: ... - def after_rollback(self, session) -> None: ... - def after_soft_rollback(self, session, previous_transaction) -> None: ... - def before_flush(self, session, flush_context, instances) -> None: ... - def after_flush(self, session, flush_context) -> None: ... - def after_flush_postexec(self, session, flush_context) -> None: ... - def after_begin(self, session, transaction, connection) -> None: ... - def before_attach(self, session, instance) -> None: ... - def after_attach(self, session, instance) -> None: ... - def after_bulk_update(self, update_context) -> None: ... - def after_bulk_delete(self, delete_context) -> None: ... - def transient_to_pending(self, session, instance) -> None: ... - def pending_to_transient(self, session, instance) -> None: ... - def persistent_to_transient(self, session, instance) -> None: ... - def pending_to_persistent(self, session, instance) -> None: ... - def detached_to_persistent(self, session, instance) -> None: ... - def loaded_as_persistent(self, session, instance) -> None: ... - def persistent_to_deleted(self, session, instance) -> None: ... - def deleted_to_persistent(self, session, instance) -> None: ... - def deleted_to_detached(self, session, instance) -> None: ... - def persistent_to_detached(self, session, instance) -> None: ... - -class AttributeEvents(event.Events): - def append(self, target, value, initiator) -> None: ... - def append_wo_mutation(self, target, value, initiator) -> None: ... - def bulk_replace(self, target, values, initiator) -> None: ... - def remove(self, target, value, initiator) -> None: ... - def set(self, target, value, oldvalue, initiator) -> None: ... - def init_scalar(self, target, value, dict_) -> None: ... - def init_collection(self, target, collection, collection_adapter) -> None: ... - def dispose_collection(self, target, collection, collection_adapter) -> None: ... - def modified(self, target, initiator) -> None: ... - -class QueryEvents(event.Events): - def before_compile(self, query) -> None: ... - def before_compile_update(self, query, update_context) -> None: ... - def before_compile_delete(self, query, delete_context) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi deleted file mode 100644 index b589abf2f489..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from .. import exc as sa_exc -from ..exc import NoResultFound as NoResultFound - -NO_STATE: Any - -class StaleDataError(sa_exc.SQLAlchemyError): ... - -ConcurrentModificationError = StaleDataError - -class FlushError(sa_exc.SQLAlchemyError): ... -class UnmappedError(sa_exc.InvalidRequestError): ... -class ObjectDereferencedError(sa_exc.SQLAlchemyError): ... - -class DetachedInstanceError(sa_exc.SQLAlchemyError): - code: str - -class UnmappedInstanceError(UnmappedError): - def __init__(self, obj, msg: Incomplete | None = None) -> None: ... - def __reduce__(self): ... - -class UnmappedClassError(UnmappedError): - def __init__(self, cls, msg: Incomplete | None = None) -> None: ... - def __reduce__(self): ... - -class ObjectDeletedError(sa_exc.InvalidRequestError): - def __init__(self, state, msg: Incomplete | None = None) -> None: ... - def __reduce__(self): ... - -class UnmappedColumnError(sa_exc.InvalidRequestError): ... - -class LoaderStrategyException(sa_exc.InvalidRequestError): - def __init__(self, applied_to_property_type, requesting_property, applies_to, actual_strategy_type, strategy_key) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi deleted file mode 100644 index 59f767906eed..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from _typeshed import Incomplete - -class IdentityMap: - def keys(self): ... - def replace(self, state) -> None: ... - def add(self, state) -> None: ... - def update(self, dict_) -> None: ... - def clear(self) -> None: ... - def check_modified(self): ... - def has_key(self, key): ... - def popitem(self) -> None: ... - def pop(self, key, *args) -> None: ... - def setdefault(self, key, default: Incomplete | None = None) -> None: ... - def __len__(self) -> int: ... - def copy(self) -> None: ... - def __setitem__(self, key, value) -> None: ... - def __delitem__(self, key) -> None: ... - -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: Incomplete | None = None): ... - def items(self): ... - def values(self): ... - def __iter__(self): ... - def all_states(self): ... - def discard(self, state) -> None: ... - def safe_discard(self, state) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi deleted file mode 100644 index b808e3dd39ef..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi +++ /dev/null @@ -1,92 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..util.langhelpers import HasMemoized, hybridmethod -from . import base - -DEL_ATTR: Any - -instrumentation_finders: Any - -class ClassManager(HasMemoized, dict[Any, Any]): - MANAGER_ATTR: Any - STATE_ATTR: Any - expired_attribute_loader: Any - init_method: Any - factory: Any - mapper: Any - declarative_scan: Any - registry: Any - @property - def deferred_scalar_loader(self): ... - @deferred_scalar_loader.setter - def deferred_scalar_loader(self, obj) -> None: ... - class_: Any - info: Any - new_init: Any - local_attrs: Any - originals: Any - dispatch: Incomplete - def __init__(self, class_) -> None: ... - def __hash__(self) -> int: ... # type: ignore[override] - def __eq__(self, other): ... - @property - def is_mapped(self): ... - # Will be overwritten when mapped - # def mapper(self) -> None: ... - def manage(self) -> None: ... - @hybridmethod - def manager_getter(self): ... - @hybridmethod - def state_getter(self): ... - @hybridmethod - def dict_getter(self): ... - def instrument_attribute(self, key, inst, propagated: bool = False) -> None: ... - def subclass_managers(self, recursive) -> None: ... - def post_configure_attribute(self, key) -> None: ... - def uninstrument_attribute(self, key, propagated: bool = False) -> None: ... - def unregister(self) -> None: ... - def install_descriptor(self, key, inst) -> None: ... - def uninstall_descriptor(self, key) -> None: ... - def install_member(self, key, implementation) -> None: ... - def uninstall_member(self, key) -> None: ... - def instrument_collection_class(self, key, collection_class): ... - def initialize_collection(self, key, state, factory): ... - def is_instrumented(self, key, search: bool = False): ... - def get_impl(self, key): ... - @property - def attributes(self): ... - def new_instance(self, state: Incomplete | None = None): ... - def setup_instance(self, instance, state: Incomplete | None = None) -> None: ... - def teardown_instance(self, instance) -> None: ... - def has_state(self, instance): ... - def has_parent(self, state, key, optimistic: bool = False): ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - -class _SerializeManager: - class_: Any - def __init__(self, state, d) -> None: ... - def __call__(self, state, inst, state_dict) -> None: ... - -class InstrumentationFactory: - dispatch: Incomplete - def create_manager_for_cls(self, class_): ... - def unregister(self, class_) -> None: ... - -instance_state: Any - -instance_dict: Any -manager_of_class = base.manager_of_class - -def register_class( - class_, - finalize: bool = True, - mapper: Incomplete | None = None, - registry: Incomplete | None = None, - declarative_scan: Incomplete | None = None, - expired_attribute_loader: Incomplete | None = None, - init_method: Incomplete | None = None, -): ... -def unregister_class(class_) -> None: ... -def is_instrumented(instance, key): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi deleted file mode 100644 index 8a3c2e2983b0..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi +++ /dev/null @@ -1,133 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, TypeVar - -from .. import util -from ..sql import operators, roles -from ..sql.base import ExecutableOption -from ..sql.traversals import HasCacheKey -from .base import ( - EXT_CONTINUE as EXT_CONTINUE, - EXT_SKIP as EXT_SKIP, - EXT_STOP as EXT_STOP, - MANYTOMANY as MANYTOMANY, - MANYTOONE as MANYTOONE, - NOT_EXTENSION as NOT_EXTENSION, - ONETOMANY as ONETOMANY, - InspectionAttr as InspectionAttr, - InspectionAttrInfo as InspectionAttrInfo, - _MappedAttribute as _MappedAttribute, -) - -_T = TypeVar("_T") - -__all__ = ( - "EXT_CONTINUE", - "EXT_STOP", - "EXT_SKIP", - "ONETOMANY", - "MANYTOMANY", - "MANYTOONE", - "NOT_EXTENSION", - "LoaderStrategy", - "MapperOption", - "LoaderOption", - "MapperProperty", - "PropComparator", - "StrategizedProperty", -) - -class ORMStatementRole(roles.StatementRole): ... -class ORMColumnsClauseRole(roles.ColumnsClauseRole): ... -class ORMEntityColumnsClauseRole(ORMColumnsClauseRole): ... -class ORMFromClauseRole(roles.StrictFromClauseRole): ... - -class MapperProperty(HasCacheKey, _MappedAttribute, InspectionAttr, util.MemoizedSlots): - cascade: Any - is_property: bool - key: Incomplete - info: Incomplete - def setup(self, context, query_entity, path, adapter, **kwargs) -> None: ... - def create_row_processor(self, context, query_entity, path, mapper, result, adapter, populators) -> None: ... - def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Incomplete | None = None): ... - parent: Any - def set_parent(self, parent, init) -> None: ... - def instrument_class(self, mapper) -> None: ... - def __init__(self) -> None: ... - def init(self) -> None: ... - @property - def class_attribute(self): ... - def do_init(self) -> None: ... - def post_instrument_class(self, mapper) -> None: ... - def merge( - self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map - ) -> None: ... - -class PropComparator(operators.ColumnOperators[_T], Generic[_T]): - __visit_name__: str - prop: Any - property: Any - def __init__(self, prop, parentmapper, adapt_to_entity: Incomplete | None = None) -> None: ... - def __clause_element__(self) -> None: ... - 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 and_(self, *criteria): ... - def any(self, criterion: Incomplete | None = None, **kwargs): ... - def has(self, criterion: Incomplete | None = None, **kwargs): ... - -class StrategizedProperty(MapperProperty): - inherit_cache: bool - strategy_wildcard_key: Any - def setup(self, context, query_entity, path, adapter, **kwargs) -> None: ... - def create_row_processor(self, context, query_entity, path, mapper, result, adapter, populators) -> None: ... - strategy: Any - def do_init(self) -> None: ... - def post_instrument_class(self, mapper) -> None: ... - @classmethod - def strategy_for(cls, **kw): ... - -class ORMOption(ExecutableOption): - propagate_to_loaders: bool - -class CompileStateOption(HasCacheKey, ORMOption): - def process_compile_state(self, compile_state) -> None: ... - def process_compile_state_replaced_entities(self, compile_state, mapper_entities) -> None: ... - -class LoaderOption(CompileStateOption): - def process_compile_state_replaced_entities(self, compile_state, mapper_entities) -> None: ... - def process_compile_state(self, compile_state) -> None: ... - -class CriteriaOption(CompileStateOption): - def process_compile_state(self, compile_state) -> None: ... - def get_global_criteria(self, attributes) -> None: ... - -class UserDefinedOption(ORMOption): - propagate_to_loaders: bool - payload: Any - def __init__(self, payload: Incomplete | None = None) -> None: ... - -class MapperOption(ORMOption): - propagate_to_loaders: bool - def process_query(self, query) -> None: ... - def process_query_conditionally(self, query) -> None: ... - -class LoaderStrategy: - parent_property: Any - is_class_level: bool - parent: Any - key: Any - strategy_key: Any - strategy_opts: Any - def __init__(self, parent, strategy_key) -> None: ... - def init_class_attribute(self, mapper) -> None: ... - def setup_query(self, compile_state, query_entity, path, loadopt, adapter, **kwargs) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi deleted file mode 100644 index 328b33ef126b..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi +++ /dev/null @@ -1,47 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def instances(cursor, context): ... -def merge_frozen_result(session, statement, frozen_result, load: bool = True): ... -def merge_result(query, iterator, load: bool = True): ... -def get_from_identity(session, mapper, key, passive): ... -def load_on_ident( - session, - statement, - key, - load_options: Incomplete | None = None, - refresh_state: Incomplete | None = None, - with_for_update: Incomplete | None = None, - only_load_props: Incomplete | None = None, - no_autoflush: bool = False, - bind_arguments=..., - execution_options=..., -): ... -def load_on_pk_identity( - session, - statement, - primary_key_identity, - load_options: Incomplete | None = None, - refresh_state: Incomplete | None = None, - with_for_update: Incomplete | None = None, - only_load_props: Incomplete | None = None, - identity_token: Incomplete | None = None, - no_autoflush: bool = False, - bind_arguments=..., - execution_options=..., -): ... - -class PostLoad: - loaders: Any - states: Any - load_keys: Any - def add_state(self, state, overwrite) -> None: ... - def invoke(self, context, path) -> None: ... - @classmethod - def for_context(cls, context, path, only_load_props): ... - @classmethod - def path_exists(cls, context, path, key): ... - @classmethod - def callable_for_path(cls, context, path, limit_to_mapper, token, loader_callable, *arg, **kw) -> None: ... - -def load_scalar_attributes(mapper, state, attribute_names, passive) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi deleted file mode 100644 index 7cc169c1c5a0..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi +++ /dev/null @@ -1,145 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..sql import base as sql_base -from ..util.langhelpers import HasMemoized, memoized_property -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, -) -from .interfaces import InspectionAttr, ORMEntityColumnsClauseRole, ORMFromClauseRole - -NO_ATTRIBUTE: Any - -class Mapper(ORMFromClauseRole, ORMEntityColumnsClauseRole, sql_base.MemoizedHasCacheKey, InspectionAttr): - logger: Any - class_: Any - class_manager: Any - non_primary: Any - always_refresh: Any - version_id_prop: Any - version_id_col: Any - version_id_generator: bool - concrete: Any - single: bool - inherits: Any - local_table: Any - inherit_condition: Any - inherit_foreign_keys: Any - batch: Any - eager_defaults: Any - column_prefix: Any - polymorphic_on: Any - validators: Any - passive_updates: Any - passive_deletes: Any - legacy_is_orphan: Any - allow_partial_pks: Any - confirm_deleted_rows: bool - polymorphic_load: Any - polymorphic_identity: Any - polymorphic_map: Any - include_properties: Any - exclude_properties: Any - dispatch: Incomplete - def __init__( - self, - class_, - local_table: Incomplete | None = None, - properties: Incomplete | None = None, - primary_key: Incomplete | None = None, - non_primary: bool = False, - inherits: Incomplete | None = None, - inherit_condition: Incomplete | None = None, - inherit_foreign_keys: Incomplete | None = None, - always_refresh: bool = False, - version_id_col: Incomplete | None = None, - version_id_generator: Incomplete | None = None, - polymorphic_on: Incomplete | None = None, - _polymorphic_map: Incomplete | None = None, - polymorphic_identity: Incomplete | None = None, - concrete: bool = False, - with_polymorphic: Incomplete | None = None, - polymorphic_load: Incomplete | None = None, - allow_partial_pks: bool = True, - batch: bool = True, - column_prefix: Incomplete | None = None, - include_properties: Incomplete | None = None, - exclude_properties: Incomplete | None = None, - passive_updates: bool = True, - passive_deletes: bool = False, - confirm_deleted_rows: bool = True, - eager_defaults: bool = False, - legacy_is_orphan: bool = False, - _compiled_cache_size: int = 100, - ): ... - is_mapper: bool - represents_outer_join: bool - @property - def mapper(self): ... - @property - def entity(self): ... - persist_selectable: Any - configured: bool - tables: Any - primary_key: Any - base_mapper: Any - columns: Any - c: Any - @property - def mapped_table(self): ... - def add_properties(self, dict_of_properties) -> None: ... - def add_property(self, key, prop) -> None: ... - def has_property(self, key): ... - def get_property(self, key, _configure_mappers: bool = True): ... - def get_property_by_column(self, column): ... - @property - def iterate_properties(self): ... - with_polymorphic_mappers: Any - def __clause_element__(self): ... - @memoized_property - def select_identity_token(self): ... - @property - def selectable(self): ... - @HasMemoized.memoized_attribute - def attrs(self): ... - @HasMemoized.memoized_attribute - def all_orm_descriptors(self): ... - @HasMemoized.memoized_attribute - def synonyms(self): ... - @property - def entity_namespace(self): ... - @HasMemoized.memoized_attribute - def column_attrs(self): ... - @HasMemoized.memoized_attribute - def relationships(self): ... - @HasMemoized.memoized_attribute - def composites(self): ... - def common_parent(self, other): ... - def is_sibling(self, other): ... - def isa(self, other): ... - def iterate_to_root(self) -> None: ... - @HasMemoized.memoized_attribute - 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, identity_token: Incomplete | None = None, adapter: Incomplete | None = None): ... - def identity_key_from_primary_key(self, primary_key, identity_token: Incomplete | None = None): ... - def identity_key_from_instance(self, instance): ... - def primary_key_from_instance(self, instance): ... - def cascade_iterator(self, type_, state, halt_on: Incomplete | None = None) -> None: ... - -class _OptGetColumnsNotAvailable(Exception): ... - -def configure_mappers() -> None: ... -def reconstructor(fn): ... -def validates(*names, **kw): ... - -class _ColumnMapping(dict[Any, Any]): - mapper: Any - def __init__(self, mapper) -> None: ... - def __missing__(self, column) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi deleted file mode 100644 index 370731d649ac..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi +++ /dev/null @@ -1,107 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, ClassVar - -from ..sql.traversals import HasCacheKey -from ..util.langhelpers import memoized_property -from . import base as orm_base - -log: Any - -class PathRegistry(HasCacheKey): - root: ClassVar[RootRegistry] - is_token: bool - is_root: bool - def __eq__(self, other): ... - def __ne__(self, other): ... - def set(self, attributes, key, value) -> None: ... - def setdefault(self, attributes, key, value) -> None: ... - def get(self, attributes, key, value: Incomplete | None = None): ... - def __len__(self) -> int: ... - def __hash__(self) -> int: ... - @property - def length(self): ... - def pairs(self) -> None: ... - def contains_mapper(self, mapper): ... - def contains(self, attributes, key): ... - def __reduce__(self): ... - @classmethod - def serialize_context_dict(cls, dict_, tokens): ... - @classmethod - def deserialize_context_dict(cls, serialized): ... - 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): - inherit_cache: bool - path: Any - natural_path: Any - has_entity: bool - is_aliased_class: bool - is_root: bool - def __getitem__(self, entity): ... - -class PathToken(orm_base.InspectionAttr, HasCacheKey, str): - @classmethod - def intern(cls, strvalue): ... - -class TokenRegistry(PathRegistry): - inherit_cache: bool - token: Any - parent: Any - path: Any - natural_path: Any - def __init__(self, parent, token) -> None: ... - has_entity: bool - is_token: bool - def generate_for_superclasses(self) -> None: ... - def __getitem__(self, entity) -> None: ... - -class PropRegistry(PathRegistry): - is_unnatural: bool - inherit_cache: bool - prop: Any - parent: Any - path: Any - natural_path: Any - def __init__(self, parent, prop) -> None: ... - @memoized_property - def has_entity(self): ... - @memoized_property - def entity(self): ... - @property - def mapper(self): ... - @property - def entity_path(self): ... - def __getitem__(self, entity): ... - -class AbstractEntityRegistry(PathRegistry): - has_entity: bool - key: Any - parent: Any - is_aliased_class: Any - entity: Any - path: Any - natural_path: Any - def __init__(self, parent, entity) -> None: ... - @property - def entity_path(self): ... - @property - def mapper(self): ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - def __getitem__(self, entity): ... - -class SlotsEntityRegistry(AbstractEntityRegistry): - inherit_cache: bool - -class CachingEntityRegistry(AbstractEntityRegistry, dict[Incomplete, Incomplete]): # type: ignore[misc] - inherit_cache: bool - def __getitem__(self, entity): ... - def __missing__(self, key): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi deleted file mode 100644 index bf80b919d6b5..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi +++ /dev/null @@ -1,40 +0,0 @@ -from typing import Any - -from ..sql.base import CompileState, Options -from ..sql.dml import DeleteDMLState, InsertDMLState, UpdateDMLState - -def save_obj(base_mapper, states, uowtransaction, single: bool = False) -> None: ... -def post_update(base_mapper, states, uowtransaction, post_update_cols) -> None: ... -def delete_obj(base_mapper, states, uowtransaction) -> None: ... - -class BulkUDCompileState(CompileState): - class default_update_options(Options): ... - - @classmethod - def orm_pre_session_exec(cls, session, statement, params, execution_options, bind_arguments, is_reentrant_invoke): ... - @classmethod - def orm_setup_cursor_result(cls, session, statement, params, execution_options, bind_arguments, result): ... - -class ORMDMLState: - @classmethod - def get_entity_description(cls, statement): ... - @classmethod - def get_returning_column_descriptions(cls, statement): ... - -class ORMInsert(ORMDMLState, InsertDMLState): - @classmethod - def orm_pre_session_exec(cls, session, statement, params, execution_options, bind_arguments, is_reentrant_invoke): ... - @classmethod - def orm_setup_cursor_result(cls, session, statement, params, execution_options, bind_arguments, result): ... - -class BulkORMUpdate(UpdateDMLState, BulkUDCompileState): - mapper: Any - extra_criteria_entities: Any - @classmethod - def create_for_statement(cls, statement, compiler, **kw): ... - -class BulkORMDelete(DeleteDMLState, BulkUDCompileState): - mapper: Any - extra_criteria_entities: Any - @classmethod - def create_for_statement(cls, statement, compiler, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/properties.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/properties.pyi deleted file mode 100644 index 21dd028612c7..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/properties.pyi +++ /dev/null @@ -1,45 +0,0 @@ -from typing import Any - -from .. import util -from .descriptor_props import ( - CompositeProperty as CompositeProperty, - ConcreteInheritedProperty as ConcreteInheritedProperty, - SynonymProperty as SynonymProperty, -) -from .interfaces import PropComparator, StrategizedProperty -from .relationships import RelationshipProperty as RelationshipProperty - -__all__ = ["ColumnProperty", "CompositeProperty", "ConcreteInheritedProperty", "RelationshipProperty", "SynonymProperty"] - -class ColumnProperty(StrategizedProperty): - logger: Any - strategy_wildcard_key: str - inherit_cache: bool - columns: Any - group: Any - deferred: Any - raiseload: Any - instrument: Any - comparator_factory: Any - descriptor: Any - active_history: Any - expire_on_flush: Any - info: Any - doc: Any - strategy_key: Any - def __init__(self, *columns, **kwargs) -> None: ... - def __clause_element__(self): ... - @property - def expression(self): ... - def instrument_class(self, mapper) -> None: ... - def do_init(self) -> None: ... - def copy(self): ... - def merge( - self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map - ) -> None: ... - - class Comparator(util.MemoizedSlots, PropComparator[Any]): - expressions: Any - def _memoized_method___clause_element__(self): ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi deleted file mode 100644 index c98765f8cbed..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi +++ /dev/null @@ -1,143 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Iterator -from typing import Any, Generic, TypeVar -from typing_extensions import Literal, Self, TypeAlias - -from ..sql.annotation import SupportsCloneAnnotations -from ..sql.base import Executable -from ..sql.selectable import GroupedElement, HasHints, HasPrefixes, HasSuffixes, SelectBase, _SelectFromElements -from . import interfaces -from .context import QueryContext as QueryContext -from .util import aliased as aliased - -__all__ = ["Query", "QueryContext", "aliased"] - -_T = TypeVar("_T") -_SynchronizeSessionArgument: TypeAlias = Literal[False, "evaluate", "fetch"] - -class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffixes, HasHints, Executable, Generic[_T]): - logger: Any - load_options: Any - session: Any - dispatch: Incomplete - def __init__(self, entities, session: Incomplete | None = None) -> None: ... - @property - def statement(self): ... - def subquery(self, name: str | None = None, with_labels: bool = False, reduce_columns: bool = False): ... - def cte(self, name: Incomplete | None = None, recursive: bool = False, nesting: bool = False): ... - def label(self, name): ... - def as_scalar(self): ... - def scalar_subquery(self): ... - @property - def selectable(self): ... - def __clause_element__(self): ... - def only_return_tuples(self, value) -> Self: ... - @property - def is_single_entity(self): ... - def enable_eagerloads(self, value) -> Self: ... - def with_labels(self): ... - apply_labels: Any - @property - def get_label_style(self): ... - def set_label_style(self, style): ... - def enable_assertions(self, value) -> Self: ... - @property - def whereclause(self): ... - def with_polymorphic( - self, cls_or_mappers, selectable: Incomplete | None = None, polymorphic_on: Incomplete | None = None - ) -> Self: ... - def yield_per(self, count) -> Self: ... - def get(self, ident): ... - @property - def lazy_loaded_from(self): ... - def correlate(self, *fromclauses) -> Self: ... - def autoflush(self, setting) -> Self: ... - def populate_existing(self) -> Self: ... - def with_parent(self, instance, property: Incomplete | None = None, from_entity: Incomplete | None = None): ... - def add_entity(self, entity, alias: Incomplete | None = None) -> Self: ... - def with_session(self, session) -> Self: ... - def from_self(self, *entities): ... - def values(self, *columns): ... - def value(self, column): ... - def with_entities(self, *entities) -> Self: ... - def add_columns(self, *column) -> Self: ... - def add_column(self, column): ... - def options(self, *args) -> Self: ... - def with_transformation(self, fn): ... - def get_execution_options(self): ... - def execution_options(self, **kwargs) -> Self: ... - def with_for_update( - self, - read: bool = False, - nowait: bool = False, - of: Incomplete | None = None, - skip_locked: bool = False, - key_share: bool = False, - ) -> Self: ... - def params(self, *args, **kwargs) -> Self: ... - def where(self, *criterion): ... - def filter(self, *criterion) -> Self: ... - def filter_by(self, **kwargs) -> Self: ... - def order_by(self, *clauses) -> Self: ... - def group_by(self, *clauses) -> Self: ... - def having(self, criterion) -> Self: ... - 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, target, *props, **kwargs) -> Self: ... - def outerjoin(self, target, *props, **kwargs) -> Self: ... - def reset_joinpoint(self) -> Self: ... - def select_from(self, *from_obj) -> Self: ... - def select_entity_from(self, from_obj) -> Self: ... - def __getitem__(self, item): ... - def slice(self, start, stop) -> Self: ... - def limit(self, limit) -> Self: ... - def offset(self, offset) -> Self: ... - def distinct(self, *expr) -> Self: ... - def all(self) -> list[_T]: ... - def from_statement(self, statement) -> Self: ... - def first(self) -> _T | None: ... - def one_or_none(self): ... - def one(self): ... - def scalar(self) -> Any: ... # type: ignore[override] - def __iter__(self) -> Iterator[_T]: ... - @property - def column_descriptions(self): ... - def instances(self, result_proxy, context: Incomplete | None = None): ... - def merge_result(self, iterator, load: bool = True): ... - def exists(self): ... - def count(self) -> int: ... - def delete(self, synchronize_session: _SynchronizeSessionArgument = "evaluate") -> int: ... - def update( - self, values, synchronize_session: _SynchronizeSessionArgument = "evaluate", update_args: Incomplete | None = None - ): ... - -class FromStatement(GroupedElement, SelectBase, Executable): - __visit_name__: str - element: Any - def __init__(self, entities, element) -> None: ... - def get_label_style(self): ... - def set_label_style(self, label_style): ... - def get_children(self, **kw) -> None: ... # type: ignore[override] - -class AliasOption(interfaces.LoaderOption): - def __init__(self, alias) -> None: ... - inherit_cache: bool - def process_compile_state(self, compile_state) -> None: ... - -class BulkUD: - query: Any - mapper: Any - def __init__(self, query) -> None: ... - @property - def session(self): ... - -class BulkUpdate(BulkUD): - values: Any - update_kwargs: Any - def __init__(self, query, values, update_kwargs) -> None: ... - -class BulkDelete(BulkUD): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi deleted file mode 100644 index b4608d3b342b..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi +++ /dev/null @@ -1,187 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, ClassVar, Generic, TypeVar - -from ..sql.operators import ColumnOperators -from ..util.langhelpers import memoized_property -from .interfaces import PropComparator, StrategizedProperty - -_T = TypeVar("_T") - -def remote(expr): ... -def foreign(expr): ... - -class RelationshipProperty(StrategizedProperty): - logger: Any - strategy_wildcard_key: str - inherit_cache: bool - uselist: Any - argument: Any - secondary: Any - primaryjoin: Any - secondaryjoin: Any - post_update: Any - direction: Any - viewonly: Any - sync_backref: Any - lazy: Any - single_parent: Any - collection_class: Any - passive_deletes: Any - cascade_backrefs: Any - passive_updates: Any - remote_side: Any - enable_typechecks: Any - query_class: Any - innerjoin: Any - distinct_target_key: Any - doc: Any - active_history: Any - join_depth: Any - omit_join: Any - local_remote_pairs: Any - bake_queries: Any - load_on_pending: Any - comparator_factory: Any - comparator: Any - info: Any - strategy_key: Any - order_by: Any - back_populates: Any - backref: Any - def __init__( - self, - argument, - secondary: Incomplete | None = None, - primaryjoin: Incomplete | None = None, - secondaryjoin: Incomplete | None = None, - foreign_keys: Incomplete | None = None, - uselist: Incomplete | None = None, - order_by: bool = False, - backref: Incomplete | None = None, - back_populates: Incomplete | None = None, - overlaps: Incomplete | None = None, - post_update: bool = False, - cascade: bool = False, - viewonly: bool = False, - lazy: str = "select", - collection_class: Incomplete | None = None, - passive_deletes=False, - passive_updates=True, - remote_side: Incomplete | None = None, - enable_typechecks=True, - join_depth: Incomplete | None = None, - comparator_factory: Incomplete | None = None, - single_parent: bool = False, - innerjoin: bool = False, - distinct_target_key: Incomplete | None = None, - doc: Incomplete | None = None, - active_history=False, - cascade_backrefs=True, - load_on_pending: bool = False, - bake_queries: bool = True, - _local_remote_pairs: Incomplete | None = None, - query_class: Incomplete | None = None, - info: Incomplete | None = None, - omit_join: Incomplete | None = None, - sync_backref: Incomplete | None = None, - _legacy_inactive_history_style: bool = False, - ) -> None: ... - def instrument_class(self, mapper) -> None: ... - - class Comparator(PropComparator[_T], Generic[_T]): - prop: Any - def __init__( - self, - prop, - parentmapper, - adapt_to_entity: Incomplete | None = None, - of_type: Incomplete | None = None, - extra_criteria=(), - ) -> None: ... - def adapt_to_entity(self, adapt_to_entity): ... - @memoized_property - def entity(self): ... - @memoized_property - def mapper(self): ... - def __clause_element__(self): ... - def of_type(self, cls): ... - def and_(self, *other): ... - def in_(self, other) -> ColumnOperators[_T]: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other): ... - def any(self, criterion: Incomplete | None = None, **kwargs): ... - def has(self, criterion: Incomplete | None = None, **kwargs): ... - def contains(self, other, **kwargs) -> ColumnOperators[_T]: ... - def __ne__(self, other) -> ColumnOperators[_T]: ... # type: ignore[override] - @memoized_property - def property(self): ... - - def merge( - self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map - ) -> None: ... - def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Incomplete | None = None) -> None: ... - @memoized_property - def entity(self): ... - @memoized_property - def mapper(self): ... - def do_init(self) -> None: ... - @property - def cascade(self): ... - @cascade.setter - def cascade(self, cascade) -> None: ... - -class JoinCondition: - parent_persist_selectable: Any - parent_local_selectable: Any - child_persist_selectable: Any - child_local_selectable: Any - parent_equivalents: Any - child_equivalents: Any - primaryjoin: Any - secondaryjoin: Any - secondary: Any - consider_as_foreign_keys: Any - prop: Any - self_referential: Any - support_sync: Any - can_be_synced_fn: Any - def __init__( - self, - parent_persist_selectable, - child_persist_selectable, - parent_local_selectable, - child_local_selectable, - primaryjoin: Incomplete | None = None, - secondary: Incomplete | None = None, - secondaryjoin: Incomplete | None = None, - parent_equivalents: Incomplete | None = None, - child_equivalents: Incomplete | None = None, - consider_as_foreign_keys: Incomplete | None = None, - local_remote_pairs: Incomplete | None = None, - remote_side: Incomplete | None = None, - self_referential: bool = False, - prop: Incomplete | None = None, - support_sync: bool = True, - can_be_synced_fn=..., - ): ... - @property - def primaryjoin_minus_local(self): ... - @property - def secondaryjoin_minus_local(self): ... - @memoized_property - def primaryjoin_reverse_remote(self): ... - @memoized_property - def remote_columns(self): ... - @memoized_property - def local_columns(self): ... - @memoized_property - def foreign_key_columns(self): ... - def join_targets( - self, source_selectable, dest_selectable, aliased, single_crit: Incomplete | None = None, extra_criteria=() - ): ... - def create_lazy_clause(self, reverse_direction: bool = False): ... - -class _ColInAnnotations: - name: Any - def __init__(self, name) -> None: ... - def __call__(self, c): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi deleted file mode 100644 index 4cb8f62cf56a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi +++ /dev/null @@ -1,105 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..util.langhelpers import memoized_property - -class ScopedSessionMixin: - def __call__(self, **kw): ... - def configure(self, **kwargs) -> None: ... - -class scoped_session(ScopedSessionMixin): - session_factory: Any - registry: Any - def __init__(self, session_factory, scopefunc: Incomplete | None = None) -> None: ... - def remove(self) -> None: ... - def query_property(self, query_cls: Incomplete | None = None): ... - # dynamically proxied from class Session - bind: Any - identity_map: Any - autoflush: Any - autocommit: bool - @property - def dirty(self): ... - @property - def deleted(self): ... - @property - def new(self): ... - @property - def is_active(self): ... - @property - def no_autoflush(self) -> None: ... - @memoized_property - def info(self): ... - @classmethod - def close_all(cls) -> None: ... - @classmethod - def identity_key(cls, *args, **kwargs): ... - @classmethod - def object_session(cls, instance): ... - def __contains__(self, instance): ... - def __iter__(self): ... - def add(self, instance, _warn: bool = True) -> None: ... - def add_all(self, instances) -> None: ... - def begin(self, subtransactions: bool = False, nested: bool = False, _subtrans: bool = False): ... - def begin_nested(self): ... - def close(self) -> None: ... - def commit(self) -> None: ... - def connection( - self, - bind_arguments: Incomplete | None = None, - close_with_result: bool = False, - execution_options: Incomplete | None = None, - **kw, - ): ... - def delete(self, instance) -> None: ... - def execute( - self, - statement, - params: Incomplete | None = None, - execution_options=..., - bind_arguments: Incomplete | None = None, - _parent_execute_state: Incomplete | None = None, - _add_event: Incomplete | None = None, - **kw, - ): ... - def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... - def expire_all(self) -> None: ... - def expunge(self, instance) -> None: ... - def expunge_all(self) -> None: ... - def flush(self, objects: Incomplete | None = None) -> None: ... - def get( - self, - entity, - ident, - options: Incomplete | None = None, - populate_existing: bool = False, - with_for_update: Incomplete | None = None, - identity_token: Incomplete | None = None, - execution_options: Incomplete | None = None, - ): ... - def get_bind( - self, - mapper: Incomplete | None = None, - clause: Incomplete | None = None, - bind: Incomplete | None = None, - _sa_skip_events: Incomplete | None = None, - _sa_skip_for_implicit_returning: bool = False, - ): ... - def is_modified(self, instance, include_collections: bool = True): ... - def bulk_save_objects( - self, objects, return_defaults: bool = False, update_changed_only: bool = True, preserve_order: bool = True - ): ... - def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = False, render_nulls: bool = False) -> None: ... - def bulk_update_mappings(self, mapper, mappings) -> None: ... - def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... - def query(self, *entities, **kwargs): ... - def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None) -> None: ... - def rollback(self) -> None: ... - def scalar( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - def scalars( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - -ScopedSession = scoped_session diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi deleted file mode 100644 index 4b2148e7c867..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi +++ /dev/null @@ -1,232 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Mapping -from types import TracebackType -from typing import Any, TypeVar, overload -from typing_extensions import Self - -from ..engine.base import Connection -from ..engine.result import Result -from ..engine.util import TransactionalContext -from ..sql.elements import ColumnElement -from ..sql.schema import Table -from ..util.langhelpers import MemoizedSlots, memoized_property -from .query import Query - -_T = TypeVar("_T") - -class _SessionClassMethods: - @classmethod - def close_all(cls) -> None: ... - @classmethod - def identity_key(cls, *args, **kwargs): ... - @classmethod - def object_session(cls, instance): ... - -class ORMExecuteState(MemoizedSlots): - session: Any - statement: Any - parameters: Any - local_execution_options: Any - execution_options: Any - bind_arguments: Any - def __init__( - self, session, statement, parameters, execution_options, bind_arguments, compile_state_cls, events_todo - ) -> None: ... - def invoke_statement( - self, - statement: Incomplete | None = None, - params: Incomplete | None = None, - execution_options: Incomplete | None = None, - bind_arguments: Incomplete | None = None, - ): ... - @property - def bind_mapper(self): ... - @property - def all_mappers(self): ... - @property - def is_orm_statement(self): ... - @property - def is_select(self): ... - @property - def is_insert(self): ... - @property - def is_update(self): ... - @property - def is_delete(self): ... - def update_execution_options(self, **opts) -> None: ... - @property - def lazy_loaded_from(self): ... - @property - def loader_strategy_path(self): ... - @property - def is_column_load(self): ... - @property - def is_relationship_load(self): ... - @property - def load_options(self): ... - @property - def update_delete_options(self): ... - @property - def user_defined_options(self): ... - -class SessionTransaction(TransactionalContext): - session: Any - nested: Any - def __init__(self, session, parent: Incomplete | None = None, nested: bool = False, autobegin: bool = False) -> None: ... - @property - def parent(self): ... - @property - def is_active(self): ... - def connection(self, bindkey, execution_options: Incomplete | None = None, **kwargs): ... - def prepare(self) -> None: ... - def commit(self, _to_root: bool = False): ... - def rollback(self, _capture_exception: bool = False, _to_root: bool = False): ... - def close(self, invalidate: bool = False) -> None: ... - -class Session(_SessionClassMethods): - identity_map: Any - bind: Any - future: Any - hash_key: Any - autoflush: Any - expire_on_commit: Any - enable_baked_queries: Any - autocommit: bool - twophase: Any - dispatch: Incomplete - def __init__( - self, - bind: Incomplete | None = None, - autoflush: bool = True, - future: bool = False, - expire_on_commit: bool = True, - autocommit: bool = False, - twophase: bool = False, - binds: Incomplete | None = None, - enable_baked_queries: bool = True, - info: Incomplete | None = None, - query_cls: Incomplete | None = None, - ) -> None: ... - connection_callable: Any - def __enter__(self) -> Self: ... - def __exit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - @property - def transaction(self): ... - def in_transaction(self): ... - def in_nested_transaction(self): ... - def get_transaction(self): ... - def get_nested_transaction(self): ... - @memoized_property - def info(self): ... - def begin(self, subtransactions: bool = False, nested: bool = False, _subtrans: bool = False): ... - def begin_nested(self): ... - def rollback(self) -> None: ... - def commit(self) -> None: ... - def prepare(self) -> None: ... - # TODO: bind_arguments could use a TypedDict - def connection( - self, - bind_arguments: Mapping[str, Any] | None = None, - close_with_result: bool = False, - execution_options: Mapping[str, Any] | None = None, - **kw: Any, - ) -> Connection: ... - def execute( - self, - statement, - params: Incomplete | None = None, - execution_options=..., - bind_arguments: Incomplete | None = None, - _parent_execute_state: Incomplete | None = None, - _add_event: Incomplete | None = None, - **kw, - ) -> Result: ... - def scalar( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - def scalars( - self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw - ): ... - def close(self) -> None: ... - def invalidate(self) -> None: ... - def expunge_all(self) -> None: ... - def bind_mapper(self, mapper, bind) -> None: ... - def bind_table(self, table, bind) -> None: ... - def get_bind( - self, - mapper: Incomplete | None = None, - clause: Incomplete | None = None, - bind: Incomplete | None = None, - _sa_skip_events: Incomplete | None = None, - _sa_skip_for_implicit_returning: bool = False, - ): ... - @overload - def query(self, entities: Table, **kwargs: Any) -> Query[Any]: ... - @overload - def query(self, entities: ColumnElement[_T], **kwargs: Any) -> Query[tuple[_T]]: ... # type: ignore[misc] - @overload - def query(self, *entities: ColumnElement[_T], **kwargs: Any) -> Query[tuple[_T, ...]]: ... - @overload - def query(self, *entities: type[_T], **kwargs: Any) -> Query[_T]: ... - @property - def no_autoflush(self) -> None: ... - def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None) -> None: ... - def expire_all(self) -> None: ... - def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... - def expunge(self, instance) -> None: ... - def add(self, instance, _warn: bool = True) -> None: ... - def add_all(self, instances) -> None: ... - def delete(self, instance) -> None: ... - def get( - self, - entity, - ident, - options: Incomplete | None = None, - populate_existing: bool = False, - with_for_update: Incomplete | None = None, - identity_token: Incomplete | None = None, - execution_options: Incomplete | None = None, - ): ... - def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... - def enable_relationship_loading(self, obj) -> None: ... - def __contains__(self, instance): ... - def __iter__(self): ... - def flush(self, objects: Incomplete | None = None) -> None: ... - def bulk_save_objects( - self, objects, return_defaults: bool = False, update_changed_only: bool = True, preserve_order: bool = True - ): ... - def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = False, render_nulls: bool = False) -> None: ... - def bulk_update_mappings(self, mapper, mappings) -> None: ... - def is_modified(self, instance, include_collections: bool = True): ... - @property - def is_active(self): ... - @property - def dirty(self): ... - @property - def deleted(self): ... - @property - def new(self): ... - -class sessionmaker(_SessionClassMethods): - kw: Any - class_: Any - def __init__( - self, - bind: Incomplete | None = None, - class_=..., - autoflush: bool = True, - autocommit: bool = False, - expire_on_commit: bool = True, - info: Incomplete | None = None, - **kw, - ) -> None: ... - def begin(self): ... - def __call__(self, **local_kw) -> Session: ... - def configure(self, **new_kw) -> None: ... - -def close_all_sessions() -> None: ... -def make_transient(instance) -> None: ... -def make_transient_to_detached(instance) -> None: ... -def object_session(instance): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi deleted file mode 100644 index 14d83915ba30..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi +++ /dev/null @@ -1,82 +0,0 @@ -from typing import Any - -from ..util.langhelpers import memoized_property -from . import interfaces - -class InstanceState(interfaces.InspectionAttrInfo): - session_id: Any - key: Any - runid: Any - load_options: Any - load_path: Any - insert_order: Any - modified: bool - expired: bool - is_instance: bool - identity_token: Any - callables: Any - class_: Any - manager: Any - committed_state: Any - expired_attributes: Any - def __init__(self, obj, manager) -> None: ... - @memoized_property - def attrs(self): ... - @property - def transient(self): ... - @property - def pending(self): ... - @property - def deleted(self): ... - @property - def was_deleted(self): ... - @property - def persistent(self): ... - @property - def detached(self): ... - @property - def session(self): ... - @property - def async_session(self): ... - @property - def object(self): ... - @property - def identity(self): ... - @property - def identity_key(self): ... - @memoized_property - def parents(self): ... - @memoized_property - def mapper(self): ... - @property - def has_identity(self): ... - def obj(self) -> None: ... - @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): ... - @property - def unloaded_expirable(self): ... - -class AttributeState: - state: Any - key: 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: Any - added_items: Any - def append(self, value) -> None: ... - def remove(self, value) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi deleted file mode 100644 index 7ca4a1c2dcf4..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi +++ /dev/null @@ -1,142 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, NamedTuple - -from .. import util -from .interfaces import LoaderStrategy - -class UninstrumentedColumnLoader(LoaderStrategy): - columns: Any - def __init__(self, parent, strategy_key) -> None: ... - def setup_query( - self, compile_state, query_entity, path, loadopt, adapter, column_collection: Incomplete | None = None, **kwargs - ) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - -class ColumnLoader(LoaderStrategy): - logger: Any - columns: Any - is_composite: Any - def __init__(self, parent, strategy_key) -> None: ... - def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, check_for_adapt: bool = False, **kwargs) -> None: ... # type: ignore[override] - is_class_level: bool - def init_class_attribute(self, mapper) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - -class ExpressionColumnLoader(ColumnLoader): - logger: Any - def __init__(self, parent, strategy_key) -> None: ... - def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, **kwargs) -> None: ... # type: ignore[override] - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - is_class_level: bool - def init_class_attribute(self, mapper) -> None: ... - -class DeferredColumnLoader(LoaderStrategy): - logger: Any - raiseload: Any - columns: Any - group: Any - def __init__(self, parent, strategy_key) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - is_class_level: bool - def init_class_attribute(self, mapper) -> None: ... - def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, only_load_props: Incomplete | None = None, **kw) -> None: ... # type: ignore[override] - -class LoadDeferredColumns: - key: Any - raiseload: Any - def __init__(self, key, raiseload: bool = False) -> None: ... - def __call__(self, state, passive=...): ... - -class AbstractRelationshipLoader(LoaderStrategy): - mapper: Any - entity: Any - target: Any - uselist: Any - def __init__(self, parent, strategy_key) -> None: ... - -class DoNothingLoader(LoaderStrategy): - logger: Any - -class NoLoader(AbstractRelationshipLoader): - logger: Any - is_class_level: bool - def init_class_attribute(self, mapper) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - -class LazyLoader(AbstractRelationshipLoader, util.MemoizedSlots): - logger: Any - is_aliased_class: Any - use_get: Any - def __init__(self, parent, strategy_key) -> None: ... - is_class_level: bool - def init_class_attribute(self, mapper) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - -class LoadLazyAttribute: - key: Any - strategy_key: Any - loadopt: Any - extra_criteria: Any - def __init__(self, key, initiating_strategy, loadopt, extra_criteria) -> None: ... - def __call__(self, state, passive=...): ... - -class PostLoader(AbstractRelationshipLoader): ... - -class ImmediateLoader(PostLoader): - def init_class_attribute(self, mapper) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - -class SubqueryLoader(PostLoader): - logger: Any - join_depth: Any - def __init__(self, parent, strategy_key) -> None: ... - def init_class_attribute(self, mapper) -> None: ... - - class _SubqCollections: - session: Any - execution_options: Any - load_options: Any - params: Any - subq: Any - def __init__(self, context, subq) -> None: ... - def get(self, key, default): ... - def loader(self, state, dict_, row) -> None: ... - - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators): ... - -class JoinedLoader(AbstractRelationshipLoader): - logger: Any - join_depth: Any - def __init__(self, parent, strategy_key) -> None: ... - def init_class_attribute(self, mapper) -> None: ... - def setup_query( - self, - compile_state, - query_entity, - path, - loadopt, - adapter, - column_collection: Incomplete | None = None, - parentmapper: Incomplete | None = None, - chained_from_outerjoin: bool = False, - **kwargs, - ) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... - -class SelectInLoader(PostLoader, util.MemoizedSlots): - logger: Any - - class query_info(NamedTuple): - load_only_child: Any - load_with_join: Any - in_expr: Any - pk_cols: Any - zero_idx: Any - child_lookup_cols: Any - join_depth: Any - omit_join: Any - def __init__(self, parent, strategy_key) -> None: ... - def init_class_attribute(self, mapper) -> None: ... - def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators): ... - -def single_parent_validator(desc, prop): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi deleted file mode 100644 index e4ee26f1da18..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi +++ /dev/null @@ -1,86 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Callable -from typing import Any -from typing_extensions import Self - -from ..sql.base import Generative -from .interfaces import LoaderOption - -class Load(Generative, LoaderOption): - path: Any - context: Any - local_opts: Any - is_class_strategy: bool - def __init__(self, entity) -> None: ... - @classmethod - def for_existing_path(cls, path): ... - is_opts_only: bool - strategy: Any - propagate_to_loaders: bool - def process_compile_state_replaced_entities(self, compile_state, mapper_entities) -> None: ... - def process_compile_state(self, compile_state) -> None: ... - def options(self, *opts) -> Self: ... - def set_relationship_strategy(self, attr, strategy, propagate_to_loaders: bool = True) -> Self: ... - def set_column_strategy(self, attrs, strategy, opts: Incomplete | None = None, opts_only: bool = False) -> Self: ... - def set_generic_strategy(self, attrs, strategy) -> Self: ... - def set_class_strategy(self, strategy, opts) -> Self: ... - # Added dynamically at runtime - def contains_eager(loadopt, attr, alias: Incomplete | None = None) -> Self: ... - def load_only(loadopt, *attrs) -> Self: ... - def joinedload(loadopt, attr, innerjoin: Incomplete | None = None) -> Self: ... - def subqueryload(loadopt, attr) -> Self: ... - def selectinload(loadopt, attr) -> Self: ... - def lazyload(loadopt, attr) -> Self: ... - def immediateload(loadopt, attr) -> Self: ... - def noload(loadopt, attr) -> Self: ... - def raiseload(loadopt, attr, sql_only: bool = False) -> Self: ... - def defaultload(loadopt, attr) -> Self: ... - def defer(loadopt, key, raiseload: bool = False) -> Self: ... - def undefer(loadopt, key) -> Self: ... - def undefer_group(loadopt, name) -> Self: ... - def with_expression(loadopt, key, expression) -> Self: ... - def selectin_polymorphic(loadopt, classes) -> Self: ... - def baked_lazyload(loadopt, attr) -> Self: ... - -class _UnboundLoad(Load): - path: Any - local_opts: Any - def __init__(self) -> None: ... - -class loader_option: - name: str - # The first parameter of this Callable should always be `loadopt: Load` - fn: Callable[..., loader_option] - def __call__(self, fn: Callable[..., loader_option]) -> Self: ... - -# loader_option instances that can be used to dynamically add methods to Load at runtime -@loader_option() -def contains_eager(loadopt: Load, attr, alias: Incomplete | None = ...) -> loader_option: ... -@loader_option() -def load_only(loadopt: Load, *attrs) -> loader_option: ... -@loader_option() -def joinedload(loadopt, attr, innerjoin=None): ... -@loader_option() -def subqueryload(loadopt: Load, attr) -> loader_option: ... -@loader_option() -def selectinload(loadopt: Load, attr) -> loader_option: ... -@loader_option() -def lazyload(loadopt: Load, attr) -> loader_option: ... -@loader_option() -def immediateload(loadopt: Load, attr) -> loader_option: ... -@loader_option() -def noload(loadopt: Load, attr) -> loader_option: ... -@loader_option() -def raiseload(loadopt: Load, attr, sql_only: bool = ...) -> loader_option: ... -@loader_option() -def defaultload(loadopt: Load, attr) -> loader_option: ... -@loader_option() -def defer(loadopt: Load, key, raiseload: bool = ...) -> loader_option: ... -@loader_option() -def undefer(loadopt: Load, key) -> loader_option: ... -@loader_option() -def undefer_group(loadopt: Load, name) -> loader_option: ... -@loader_option() -def with_expression(loadopt: Load, key) -> loader_option: ... -@loader_option() -def selectin_polymorphic(loadopt: Load, classes) -> loader_option: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/sync.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/sync.pyi deleted file mode 100644 index 558c9c848c08..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/sync.pyi +++ /dev/null @@ -1,6 +0,0 @@ -def populate(source, source_mapper, dest, dest_mapper, synchronize_pairs, uowcommit, flag_cascaded_pks) -> None: ... -def bulk_populate_inherit_keys(source_dict, source_mapper, synchronize_pairs) -> None: ... -def clear(dest, dest_mapper, synchronize_pairs) -> None: ... -def update(source, source_mapper, dest, old_prefix, synchronize_pairs) -> None: ... -def populate_dict(source, source_mapper, dict_, synchronize_pairs) -> None: ... -def source_modified(uowcommit, source, source_mapper, synchronize_pairs): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi deleted file mode 100644 index 26b13e383029..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi +++ /dev/null @@ -1,109 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def track_cascade_events(descriptor, prop): ... - -class UOWTransaction: - session: Any - attributes: Any - deps: Any - mappers: Any - presort_actions: Any - postsort_actions: Any - dependencies: Any - states: Any - post_update_states: Any - def __init__(self, session): ... - @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) -> None: ... - def get_attribute_history(self, state, key, passive=...): ... - def has_dep(self, processor): ... - def register_preprocessor(self, processor, fromparent) -> None: ... - def register_object( - self, - state, - isdelete: bool = False, - listonly: bool = False, - cancel_delete: bool = False, - operation: Incomplete | None = None, - prop: Incomplete | None = None, - ): ... - def register_post_update(self, state, post_update_cols) -> None: ... - def filter_states_for_dep(self, dep, states): ... - def states_for_mapper_hierarchy(self, mapper, isdelete, listonly) -> None: ... - def execute(self): ... - def finalize_flush_changes(self) -> None: ... - -class IterateMappersMixin: ... - -class Preprocess(IterateMappersMixin): - dependency_processor: Any - fromparent: Any - processed: Any - setup_flush_actions: bool - def __init__(self, dependency_processor, fromparent) -> None: ... - def execute(self, uow): ... - -class PostSortRec: - disabled: Any - # At runtime __new__ is defined, not __init__, - # But if we define __new__ here then all subclasses are identified by pyright - # as having __init__ methods that are inconsistent with their __new__ methods - def __init__(self, uow, *args) -> None: ... - def execute_aggregate(self, uow, recs) -> None: ... - -class ProcessAll(IterateMappersMixin, PostSortRec): - dependency_processor: Any - sort_key: Any - isdelete: Any - fromparent: Any - def __init__(self, uow, dependency_processor, isdelete, fromparent) -> None: ... - def execute(self, uow) -> None: ... - def per_state_flush_actions(self, uow): ... - -class PostUpdateAll(PostSortRec): - mapper: Any - isdelete: Any - sort_key: Any - def __init__(self, uow, mapper, isdelete) -> None: ... - def execute(self, uow) -> None: ... - -class SaveUpdateAll(PostSortRec): - mapper: Any - sort_key: Any - def __init__(self, uow, mapper) -> None: ... - def execute(self, uow) -> None: ... - def per_state_flush_actions(self, uow) -> None: ... - -class DeleteAll(PostSortRec): - mapper: Any - sort_key: Any - def __init__(self, uow, mapper) -> None: ... - def execute(self, uow) -> None: ... - def per_state_flush_actions(self, uow) -> None: ... - -class ProcessState(PostSortRec): - dependency_processor: Any - sort_key: Any - isdelete: Any - state: Any - def __init__(self, uow, dependency_processor, isdelete, state) -> None: ... - def execute_aggregate(self, uow, recs) -> None: ... - -class SaveUpdateState(PostSortRec): - state: Any - mapper: Any - sort_key: Any - def __init__(self, uow, state) -> None: ... - def execute_aggregate(self, uow, recs) -> None: ... - -class DeleteState(PostSortRec): - state: Any - mapper: Any - sort_key: Any - def __init__(self, uow, state) -> None: ... - def execute_aggregate(self, uow, recs) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi deleted file mode 100644 index cb7e9f809ea9..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi +++ /dev/null @@ -1,200 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..sql import base as sql_base, expression, util as sql_util -from ..sql.annotation import SupportsCloneAnnotations -from .base import ( - InspectionAttr as InspectionAttr, - _class_to_mapper as _class_to_mapper, - _never_set as _never_set, - _none_set as _none_set, - attribute_str as attribute_str, - class_mapper as class_mapper, - instance_str as instance_str, - object_mapper as object_mapper, - object_state as object_state, - state_attribute_str as state_attribute_str, - state_class_str as state_class_str, - state_str as state_str, -) -from .interfaces import CriteriaOption, ORMColumnsClauseRole, ORMEntityColumnsClauseRole, ORMFromClauseRole - -all_cascades: Any - -class CascadeOptions(frozenset[Any]): - save_update: Any - delete: Any - refresh_expire: Any - merge: Any - expunge: Any - delete_orphan: Any - def __new__(cls, value_list): ... - @classmethod - def from_string(cls, arg): ... - -def polymorphic_union(table_map, typecolname, aliasname: str = "p_union", cast_nulls: bool = True): ... -def identity_key(*args, **kwargs): ... - -class ORMAdapter(sql_util.ColumnAdapter): - mapper: Any - aliased_class: Any - def __init__( - self, - entity, - equivalents: Incomplete | None = None, - adapt_required: bool = False, - allow_label_resolve: bool = True, - anonymize_labels: bool = False, - ) -> None: ... - -class AliasedClass: - __name__: Any - def __init__( - self, - mapped_class_or_ac, - alias: Incomplete | None = None, - name: Incomplete | None = None, - flat: bool = False, - adapt_on_names: bool = False, - with_polymorphic_mappers=(), - with_polymorphic_discriminator: Incomplete | None = None, - base_alias: Incomplete | None = None, - use_mapper_path: bool = False, - represents_outer_join: bool = False, - ) -> None: ... - def __getattr__(self, key: str): ... - -class AliasedInsp(ORMEntityColumnsClauseRole, ORMFromClauseRole, sql_base.MemoizedHasCacheKey, InspectionAttr): - mapper: Any - selectable: Any - name: Any - polymorphic_on: Any - represents_outer_join: Any - with_polymorphic_mappers: Any - def __init__( - self, - entity, - inspected, - selectable, - name, - with_polymorphic_mappers, - polymorphic_on, - _base_alias, - _use_mapper_path, - adapt_on_names, - represents_outer_join, - nest_adapters: bool, # added in 1.4.30 - ) -> None: ... - @property - def entity(self): ... - is_aliased_class: bool - def __clause_element__(self): ... - @property - def entity_namespace(self): ... - @property - def class_(self): ... - -class _WrapUserEntity: - subject: Any - def __init__(self, subject) -> None: ... - def __getattribute__(self, name: str): ... - -class LoaderCriteriaOption(CriteriaOption): - root_entity: Any - entity: Any - deferred_where_criteria: bool - where_criteria: Any - include_aliases: Any - propagate_to_loaders: Any - def __init__( - self, - entity_or_base, - where_criteria, - loader_only: bool = False, - include_aliases: bool = False, - propagate_to_loaders: bool = True, - track_closure_variables: bool = True, - ) -> None: ... - def process_compile_state_replaced_entities(self, compile_state, mapper_entities): ... - def process_compile_state(self, compile_state) -> None: ... - def get_global_criteria(self, attributes) -> None: ... - -def aliased( - element, alias: Incomplete | None = None, name: Incomplete | None = None, flat: bool = False, adapt_on_names: bool = False -): ... -def with_polymorphic( - base, - classes, - selectable: bool = False, - flat: bool = False, - polymorphic_on: Incomplete | None = None, - aliased: bool = False, - adapt_on_names: bool = False, - innerjoin: bool = False, - _use_mapper_path: bool = False, - _existing_alias: Incomplete | None = None, -) -> AliasedClass: ... - -class Bundle(ORMColumnsClauseRole, SupportsCloneAnnotations, sql_base.MemoizedHasCacheKey, InspectionAttr): - single_entity: bool - is_clause_element: bool - is_mapper: bool - is_aliased_class: bool - is_bundle: bool - name: Any - exprs: Any - c: Any - def __init__(self, name, *exprs, **kw) -> None: ... - @property - def mapper(self): ... - @property - def entity(self): ... - @property - def entity_namespace(self): ... - columns: Any - def __clause_element__(self): ... - @property - def clauses(self): ... - def label(self, name): ... - def create_row_processor(self, query, procs, labels): ... - -class _ORMJoin(expression.Join): - __visit_name__: Any - inherit_cache: bool - onclause: Any - def __init__( - self, - left, - right, - onclause: Incomplete | None = None, - isouter: bool = False, - full: bool = False, - _left_memo: Incomplete | None = None, - _right_memo: Incomplete | None = None, - _extra_criteria=(), - ) -> None: ... - def join( - self, - right, - onclause: Incomplete | None = None, - isouter: bool = False, - full: bool = False, - join_to_left: Incomplete | None = None, - ): ... - def outerjoin( - self, right, onclause: Incomplete | None = None, full: bool = False, join_to_left: Incomplete | None = None - ): ... - -def join( - left, - right, - onclause: Incomplete | None = None, - isouter: bool = False, - full: bool = False, - join_to_left: Incomplete | None = None, -): ... -def outerjoin(left, right, onclause: Incomplete | None = None, full: bool = False, join_to_left: Incomplete | None = None): ... -def with_parent(instance, prop, from_entity: Incomplete | None = None): ... -def has_identity(object_): ... -def was_deleted(object_): ... -def randomize_unitofwork() -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/__init__.pyi deleted file mode 100644 index 977c65ad93f6..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/pool/__init__.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from .base import Pool as Pool, reset_commit as reset_commit, reset_none as reset_none, reset_rollback as reset_rollback -from .dbapi_proxy import clear_managers as clear_managers, manage as manage -from .impl import ( - AssertionPool as AssertionPool, - AsyncAdaptedQueuePool as AsyncAdaptedQueuePool, - FallbackAsyncAdaptedQueuePool as FallbackAsyncAdaptedQueuePool, - NullPool as NullPool, - QueuePool as QueuePool, - SingletonThreadPool as SingletonThreadPool, - StaticPool as StaticPool, -) - -__all__ = [ - "Pool", - "reset_commit", - "reset_none", - "reset_rollback", - "clear_managers", - "manage", - "AssertionPool", - "NullPool", - "QueuePool", - "AsyncAdaptedQueuePool", - "FallbackAsyncAdaptedQueuePool", - "SingletonThreadPool", - "StaticPool", -] diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi deleted file mode 100644 index 0941b0c6b705..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi +++ /dev/null @@ -1,94 +0,0 @@ -from _typeshed import Incomplete -from _typeshed.dbapi import DBAPIConnection -from collections.abc import Callable -from typing import Any - -from .. import log -from ..util.langhelpers import memoized_property - -reset_rollback: Any -reset_commit: Any -reset_none: Any - -class _ConnDialect: - is_async: bool - has_terminate: bool - def do_rollback(self, dbapi_connection) -> None: ... - def do_commit(self, dbapi_connection) -> None: ... - def do_terminate(self, dbapi_connection) -> None: ... - def do_close(self, dbapi_connection) -> None: ... - def do_ping(self, dbapi_connection) -> None: ... - def get_driver_connection(self, connection): ... - -class _AsyncConnDialect(_ConnDialect): - is_async: bool - -class Pool(log.Identified): - logging_name: Any - echo: Any - dispatch: Incomplete - def __init__( - self, - creator: Callable[[], DBAPIConnection], - recycle: int = -1, - echo: Incomplete | None = None, - logging_name: Incomplete | None = None, - reset_on_return: bool = True, - events: Incomplete | None = None, - dialect: Incomplete | None = None, - pre_ping: bool = False, - _dispatch: Incomplete | None = None, - ) -> None: ... - def recreate(self) -> None: ... - def dispose(self) -> None: ... - def connect(self): ... - def status(self) -> None: ... - -class _ConnectionRecord: - finalize_callback: Any - def __init__(self, pool, connect: bool = True) -> None: ... - fresh: bool - fairy_ref: Any - starttime: Any - dbapi_connection: Any - @property - def driver_connection(self): ... - @property - def connection(self): ... - @connection.setter - def connection(self, value) -> None: ... - @memoized_property - def info(self): ... - @memoized_property - def record_info(self): ... - @classmethod - def checkout(cls, pool): ... - def checkin(self, _fairy_was_created: bool = True) -> None: ... - @property - def in_use(self): ... - @property - def last_connect_time(self): ... - def close(self) -> None: ... - def invalidate(self, e: Incomplete | None = None, soft: bool = False) -> None: ... - def get_connection(self): ... - -class _ConnectionFairy: - dbapi_connection: Any - def __init__(self, dbapi_connection, connection_record, echo) -> None: ... - @property - def driver_connection(self): ... - @property - def connection(self): ... - @connection.setter - def connection(self, value) -> None: ... - @property - def is_valid(self): ... - @memoized_property - def info(self): ... - @property - def record_info(self): ... - def invalidate(self, e: Incomplete | None = None, soft: bool = False) -> None: ... - def cursor(self, *args, **kwargs): ... - def __getattr__(self, key: str): ... - def detach(self) -> None: ... - def close(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi deleted file mode 100644 index 6bfa8ae86dec..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Any - -proxies: Any - -def manage(module, **params): ... -def clear_managers() -> None: ... - -class _DBProxy: - module: Any - kw: Any - poolclass: Any - pools: Any - def __init__(self, module, poolclass=..., **kw) -> None: ... - def close(self) -> None: ... - def __del__(self) -> None: ... - def __getattr__(self, key: str): ... - def get_pool(self, *args, **kw): ... - def connect(self, *args, **kw): ... - def dispose(self, *args, **kw) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/events.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/events.pyi deleted file mode 100644 index 8a5dde542e3a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/pool/events.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from .. import event - -class PoolEvents(event.Events): - def connect(self, dbapi_connection, connection_record) -> None: ... - def first_connect(self, dbapi_connection, connection_record) -> None: ... - def checkout(self, dbapi_connection, connection_record, connection_proxy) -> None: ... - def checkin(self, dbapi_connection, connection_record) -> None: ... - def reset(self, dbapi_connection, connection_record) -> None: ... - def invalidate(self, dbapi_connection, connection_record, exception) -> None: ... - def soft_invalidate(self, dbapi_connection, connection_record, exception) -> None: ... - def close(self, dbapi_connection, connection_record) -> None: ... - def detach(self, dbapi_connection, connection_record) -> None: ... - def close_detached(self, dbapi_connection) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi deleted file mode 100644 index aee3c588afe0..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi +++ /dev/null @@ -1,46 +0,0 @@ -from typing import Any - -from ..util.langhelpers import memoized_property -from .base import Pool - -class QueuePool(Pool): - def __init__( - self, creator, pool_size: int = 5, max_overflow: int = 10, timeout: float = 30.0, use_lifo: bool = False, **kw - ) -> None: ... - def recreate(self): ... - def dispose(self) -> None: ... - def status(self): ... - def size(self): ... - def timeout(self): ... - def checkedin(self): ... - def overflow(self): ... - def checkedout(self): ... - -class AsyncAdaptedQueuePool(QueuePool): ... -class FallbackAsyncAdaptedQueuePool(AsyncAdaptedQueuePool): ... - -class NullPool(Pool): - def status(self): ... - def recreate(self): ... - def dispose(self) -> None: ... - -class SingletonThreadPool(Pool): - size: Any - def __init__(self, creator, pool_size: int = 5, **kw) -> None: ... - def recreate(self): ... - def dispose(self) -> None: ... - def status(self): ... - def connect(self): ... - -class StaticPool(Pool): - @memoized_property - def connection(self): ... - def status(self): ... - def dispose(self) -> None: ... - def recreate(self): ... - -class AssertionPool(Pool): - def __init__(self, *args, **kw) -> None: ... - def status(self): ... - def dispose(self) -> None: ... - def recreate(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/processors.pyi b/stubs/SQLAlchemy/sqlalchemy/processors.pyi deleted file mode 100644 index 26ee40a7c386..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/processors.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from _typeshed import Incomplete - -def str_to_datetime_processor_factory(regexp, type_): ... -def py_fallback(): ... -def to_unicode_processor_factory(encoding, errors: Incomplete | None = None): ... -def to_conditional_unicode_processor_factory(encoding, errors: Incomplete | None = None): ... -def to_decimal_processor_factory(target_class, scale): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/schema.pyi b/stubs/SQLAlchemy/sqlalchemy/schema.pyi deleted file mode 100644 index ef2cc1ed91c9..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/schema.pyi +++ /dev/null @@ -1,51 +0,0 @@ -from .sql.base import SchemaVisitor as SchemaVisitor -from .sql.ddl import ( - DDL as DDL, - AddConstraint as AddConstraint, - CreateColumn as CreateColumn, - CreateIndex as CreateIndex, - CreateSchema as CreateSchema, - CreateSequence as CreateSequence, - CreateTable as CreateTable, - DDLBase as DDLBase, - DDLElement as DDLElement, - DropColumnComment as DropColumnComment, - DropConstraint as DropConstraint, - DropIndex as DropIndex, - DropSchema as DropSchema, - DropSequence as DropSequence, - DropTable as DropTable, - DropTableComment as DropTableComment, - SetColumnComment as SetColumnComment, - SetTableComment as SetTableComment, - _CreateDropBase as _CreateDropBase, - _DDLCompiles as _DDLCompiles, - _DropView as _DropView, - sort_tables as sort_tables, - sort_tables_and_constraints as sort_tables_and_constraints, -) -from .sql.naming import conv as conv -from .sql.schema import ( - BLANK_SCHEMA as BLANK_SCHEMA, - CheckConstraint as CheckConstraint, - Column as Column, - ColumnCollectionConstraint as ColumnCollectionConstraint, - ColumnCollectionMixin as ColumnCollectionMixin, - ColumnDefault as ColumnDefault, - Computed as Computed, - Constraint as Constraint, - DefaultClause as DefaultClause, - DefaultGenerator as DefaultGenerator, - FetchedValue as FetchedValue, - ForeignKey as ForeignKey, - ForeignKeyConstraint as ForeignKeyConstraint, - Identity as Identity, - Index as Index, - MetaData as MetaData, - PrimaryKeyConstraint as PrimaryKeyConstraint, - SchemaItem as SchemaItem, - Sequence as Sequence, - Table as Table, - ThreadLocalMetaData as ThreadLocalMetaData, - UniqueConstraint as UniqueConstraint, -) diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/__init__.pyi deleted file mode 100644 index 625094b1e7ab..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/__init__.pyi +++ /dev/null @@ -1,91 +0,0 @@ -from . import sqltypes as sqltypes -from .base import Executable as Executable -from .compiler import ( - COLLECT_CARTESIAN_PRODUCTS as COLLECT_CARTESIAN_PRODUCTS, - FROM_LINTING as FROM_LINTING, - NO_LINTING as NO_LINTING, - WARN_LINTING as WARN_LINTING, -) -from .expression import ( - LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT, - LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY, - LABEL_STYLE_NONE as LABEL_STYLE_NONE, - LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL, - Alias as Alias, - ClauseElement as ClauseElement, - ColumnCollection as ColumnCollection, - ColumnElement as ColumnElement, - CompoundSelect as CompoundSelect, - Delete as Delete, - False_ as False_, - FromClause as FromClause, - Insert as Insert, - Join as Join, - LambdaElement as LambdaElement, - Select as Select, - Selectable as Selectable, - StatementLambdaElement as StatementLambdaElement, - Subquery as Subquery, - TableClause as TableClause, - TableSample as TableSample, - True_ as True_, - Update as Update, - Values as Values, - 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, - cte as cte, - 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, - label as label, - lambda_stmt as lambda_stmt, - lateral as lateral, - literal as literal, - literal_column as literal_column, - modifier as modifier, - not_ as not_, - null as null, - nulls_first as nulls_first, - nulls_last as nulls_last, - nullsfirst as nullsfirst, - nullslast as nullslast, - or_ as or_, - outerjoin as outerjoin, - outparam as outparam, - over as over, - quoted_name as quoted_name, - 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, - values as values, - within_group as within_group, -) -from .visitors import ClauseVisitor as ClauseVisitor diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/annotation.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/annotation.pyi deleted file mode 100644 index 38c96302316d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/annotation.pyi +++ /dev/null @@ -1,206 +0,0 @@ -from _typeshed import Incomplete -from typing import TypeVar - -from ..schema import Table -from ..util import immutabledict -from .compiler import _CompileLabel -from .crud import _multiparam_column -from .elements import ( - AnnotatedColumnElement as _ElementsAnnotatedColumnElement, - AsBoolean, - BinaryExpression, - BindParameter, - BooleanClauseList, - Case, - Cast, - ClauseList, - CollationClause, - CollectionAggregate, - ColumnClause, - ColumnElement, - Extract, - False_, - FunctionFilter, - Grouping, - IndexExpression, - Label, - NamedColumn, - Null, - Over, - Slice, - TableValuedColumn, - True_, - Tuple, - TypeCoerce, - UnaryExpression, - WithinGroup, - _label_reference, - _textual_label_reference, -) -from .functions import ( - AnsiFunction, - Function, - FunctionAsBinary, - FunctionElement, - GenericFunction, - OrderedSetAgg, - ReturnTypeFromArgs, - ScalarFunctionColumn, - array_agg, - char_length, - coalesce, - concat, - count, - cube, - cume_dist, - current_date, - current_time, - current_timestamp, - current_user, - dense_rank, - grouping_sets, - localtime, - localtimestamp, - max, - min, - mode, - next_value, - now, - percent_rank, - percentile_cont, - percentile_disc, - random, - rank, - rollup, - session_user, - sum, - sysdate, - user, -) -from .schema import Column -from .selectable import ( - CTE, - Alias, - AliasedReturnsRows, - AnnotatedFromClause as _SelectableAnnotatedFromClause, - Exists, - FromClause, - FromGrouping, - Join, - Lateral, - ScalarSelect, - Subquery, - TableClause, - TableSample, - TableValuedAlias, - Values, - _OffsetLimitParam, -) - -_T = TypeVar("_T") - -EMPTY_ANNOTATIONS: immutabledict[Incomplete, Incomplete] - -class SupportsAnnotations: ... -class SupportsCloneAnnotations(SupportsAnnotations): ... -class SupportsWrappingAnnotations(SupportsAnnotations): ... - -class Annotated: - __dict__: dict[str, Incomplete] - def __init__(self, element, values) -> None: ... - def __reduce__(self): ... - def __hash__(self) -> int: ... - def __eq__(self, other): ... - @property - def entity_namespace(self): ... - -annotated_classes: dict[Incomplete, Incomplete] - -# Everything below is dynamically generated at runtime - -class AnnotatedFromClause(_SelectableAnnotatedFromClause, FromClause): ... -class AnnotatedAliasedReturnsRows(AnnotatedFromClause, AliasedReturnsRows): ... -class AnnotatedAlias(AnnotatedAliasedReturnsRows, Alias): ... -class AnnotatedColumnElement(_ElementsAnnotatedColumnElement, ColumnElement[_T]): ... -class AnnotatedFunctionElement(AnnotatedColumnElement[_T], FunctionElement): ... # type: ignore[misc] -class AnnotatedFunction(AnnotatedFunctionElement[_T], Function): ... # type: ignore[misc] -class AnnotatedGenericFunction(AnnotatedFunction[_T], GenericFunction): ... # type: ignore[misc] -class AnnotatedAnsiFunction(AnnotatedGenericFunction[_T], AnsiFunction): ... # type: ignore[misc] -class AnnotatedUnaryExpression(AnnotatedColumnElement[_T], UnaryExpression): ... -class AnnotatedAsBoolean(AnnotatedUnaryExpression[_T], AsBoolean): ... -class AnnotatedBinaryExpression(AnnotatedColumnElement[_T], BinaryExpression): ... -class AnnotatedBindParameter(AnnotatedColumnElement[_T], BindParameter[_T]): ... -class AnnotatedBooleanClauseList(AnnotatedColumnElement[_T], BooleanClauseList): ... -class AnnotatedCTE(AnnotatedAliasedReturnsRows, CTE): ... -class AnnotatedCase(AnnotatedColumnElement[_T], Case): ... -class AnnotatedCast(AnnotatedColumnElement[_T], Cast): ... -class AnnotatedClauseList(Annotated, ClauseList): ... -class AnnotatedCollationClause(AnnotatedColumnElement[_T], CollationClause): ... -class AnnotatedCollectionAggregate(AnnotatedUnaryExpression[_T], CollectionAggregate): ... -class AnnotatedNamedColumn(AnnotatedColumnElement[_T], NamedColumn): ... -class AnnotatedColumnClause(AnnotatedNamedColumn[_T], ColumnClause): ... -class AnnotatedColumn(AnnotatedColumnClause[_T], Column): ... -class AnnotatedExists(AnnotatedUnaryExpression[_T], Exists): ... -class AnnotatedExtract(AnnotatedColumnElement[_T], Extract): ... -class AnnotatedFalse_(AnnotatedColumnElement[_T], False_): ... -class AnnotatedFromGrouping(AnnotatedFromClause, FromGrouping): ... -class AnnotatedFunctionAsBinary(AnnotatedBinaryExpression[_T], FunctionAsBinary): ... -class AnnotatedFunctionFilter(AnnotatedColumnElement[_T], FunctionFilter): ... -class AnnotatedGrouping(AnnotatedColumnElement[_T], Grouping): ... -class AnnotatedIndexExpression(AnnotatedBinaryExpression[_T], IndexExpression): ... -class AnnotatedJoin(AnnotatedFromClause, Join): ... -class AnnotatedLabel(AnnotatedColumnElement[_T], Label): ... -class AnnotatedLateral(AnnotatedAliasedReturnsRows, Lateral): ... -class AnnotatedNull(AnnotatedColumnElement[_T], Null): ... -class AnnotatedOrderedSetAgg(AnnotatedGenericFunction[_T], OrderedSetAgg): ... # type: ignore[misc] -class AnnotatedOver(AnnotatedColumnElement[_T], Over): ... -class AnnotatedReturnTypeFromArgs(AnnotatedGenericFunction[_T], ReturnTypeFromArgs): ... # type: ignore[misc] -class AnnotatedScalarFunctionColumn(AnnotatedNamedColumn[_T], ScalarFunctionColumn): ... -class AnnotatedScalarSelect(AnnotatedGrouping[_T], ScalarSelect): ... -class AnnotatedSlice(AnnotatedColumnElement[_T], Slice): ... -class AnnotatedSubquery(AnnotatedAliasedReturnsRows, Subquery): ... -class AnnotatedTableClause(AnnotatedFromClause, TableClause): ... -class AnnotatedTable(AnnotatedTableClause, Table): ... -class AnnotatedTableSample(AnnotatedAliasedReturnsRows, TableSample): ... -class AnnotatedTableValuedAlias(AnnotatedAlias, TableValuedAlias): ... -class AnnotatedTableValuedColumn(AnnotatedNamedColumn[_T], TableValuedColumn): ... -class AnnotatedTrue_(AnnotatedColumnElement[_T], True_): ... -class AnnotatedTuple(AnnotatedColumnElement[_T], Tuple): ... -class AnnotatedTypeCoerce(AnnotatedColumnElement[_T], TypeCoerce): ... -class AnnotatedValues(AnnotatedFromClause, Values): ... -class AnnotatedWithinGroup(AnnotatedColumnElement[_T], WithinGroup): ... -class Annotated_CompileLabel(AnnotatedColumnElement[_T], _CompileLabel): ... -class Annotated_OffsetLimitParam(AnnotatedBindParameter[_T], _OffsetLimitParam): ... -class Annotated_label_reference(AnnotatedColumnElement[_T], _label_reference): ... -class Annotated_multiparam_column(AnnotatedColumnElement[_T], _multiparam_column[_T]): ... -class Annotated_textual_label_reference(AnnotatedColumnElement[_T], _textual_label_reference): ... -class Annotatedarray_agg(AnnotatedGenericFunction[_T], array_agg): ... # type: ignore[misc] -class Annotatedchar_length(AnnotatedGenericFunction[_T], char_length): ... # type: ignore[misc] -class Annotatedcoalesce(AnnotatedReturnTypeFromArgs[_T], coalesce): ... # type: ignore[misc] -class Annotatedconcat(AnnotatedGenericFunction[_T], concat): ... # type: ignore[misc] -class Annotatedcount(AnnotatedGenericFunction[_T], count): ... # type: ignore[misc] -class Annotatedcube(AnnotatedGenericFunction[_T], cube): ... # type: ignore[misc] -class Annotatedcume_dist(AnnotatedGenericFunction[_T], cume_dist): ... # type: ignore[misc] -class Annotatedcurrent_date(AnnotatedAnsiFunction[_T], current_date): ... # type: ignore[misc] -class Annotatedcurrent_time(AnnotatedAnsiFunction[_T], current_time): ... # type: ignore[misc] -class Annotatedcurrent_timestamp(AnnotatedAnsiFunction[_T], current_timestamp): ... # type: ignore[misc] -class Annotatedcurrent_user(AnnotatedAnsiFunction[_T], current_user): ... # type: ignore[misc] -class Annotateddense_rank(AnnotatedGenericFunction[_T], dense_rank): ... # type: ignore[misc] -class Annotatedgrouping_sets(AnnotatedGenericFunction[_T], grouping_sets): ... # type: ignore[misc] -class Annotatedlocaltime(AnnotatedAnsiFunction[_T], localtime): ... # type: ignore[misc] -class Annotatedlocaltimestamp(AnnotatedAnsiFunction[_T], localtimestamp): ... # type: ignore[misc] -class Annotatedmax(AnnotatedReturnTypeFromArgs[_T], max): ... # type: ignore[misc] -class Annotatedmin(AnnotatedReturnTypeFromArgs[_T], min): ... # type: ignore[misc] -class Annotatedmode(AnnotatedOrderedSetAgg[_T], mode): ... # type: ignore[misc] -class Annotatednext_value(AnnotatedGenericFunction[_T], next_value): ... # type: ignore[misc] -class Annotatednow(AnnotatedGenericFunction[_T], now): ... # type: ignore[misc] -class Annotatedpercent_rank(AnnotatedGenericFunction[_T], percent_rank): ... # type: ignore[misc] -class Annotatedpercentile_cont(AnnotatedOrderedSetAgg[_T], percentile_cont): ... # type: ignore[misc] -class Annotatedpercentile_disc(AnnotatedOrderedSetAgg[_T], percentile_disc): ... # type: ignore[misc] -class Annotatedrandom(AnnotatedGenericFunction[_T], random): ... # type: ignore[misc] -class Annotatedrank(AnnotatedGenericFunction[_T], rank): ... # type: ignore[misc] -class Annotatedrollup(AnnotatedGenericFunction[_T], rollup): ... # type: ignore[misc] -class Annotatedsession_user(AnnotatedAnsiFunction[_T], session_user): ... # type: ignore[misc] -class Annotatedsum(AnnotatedReturnTypeFromArgs[_T], sum): ... # type: ignore[misc] -class Annotatedsysdate(AnnotatedAnsiFunction[_T], sysdate): ... # type: ignore[misc] -class Annotateduser(AnnotatedAnsiFunction[_T], user): ... # type: ignore[misc] diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi deleted file mode 100644 index 9083c4f7ff9c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi +++ /dev/null @@ -1,162 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import MutableMapping -from typing import Any, ClassVar -from typing_extensions import Self - -from .. import util -from ..util.langhelpers import HasMemoized, hybridmethod, memoized_property -from . import roles -from .elements import ColumnElement -from .traversals import ( - HasCacheKey as HasCacheKey, - HasCopyInternals as HasCopyInternals, - MemoizedHasCacheKey as MemoizedHasCacheKey, -) -from .visitors import ClauseVisitor - -coercions: Any -elements: Any -type_api: Any -PARSE_AUTOCOMMIT: Any -NO_ARG: Any - -class Immutable: - def unique_params(self, *optionaldict, **kwargs) -> None: ... - def params(self, *optionaldict, **kwargs) -> None: ... - -class SingletonConstant(Immutable): - def __new__(cls, *arg, **kw): ... - -class _DialectArgView(MutableMapping[Any, Any]): - obj: Any - def __init__(self, obj) -> None: ... - def __getitem__(self, key): ... - def __setitem__(self, key, value) -> None: ... - def __delitem__(self, key) -> None: ... - def __len__(self) -> int: ... - def __iter__(self): ... - -class _DialectArgDict(MutableMapping[Any, Any]): - def __init__(self) -> None: ... - def __len__(self) -> int: ... - def __iter__(self): ... - def __getitem__(self, key): ... - def __setitem__(self, key, value) -> None: ... - def __delitem__(self, key) -> None: ... - -class DialectKWArgs: - @classmethod - def argument_for(cls, dialect_name, argument_name, default) -> None: ... - @memoized_property - def dialect_kwargs(self): ... - @property - def kwargs(self): ... - @memoized_property - def dialect_options(self): ... - -class CompileState: - plugins: Any - @classmethod - def create_for_statement(cls, statement, compiler, **kw): ... - statement: Any - def __init__(self, statement, compiler, **kw) -> None: ... - @classmethod - def get_plugin_class(cls, statement): ... - @classmethod - def plugin_for(cls, plugin_name, visit_name): ... - -class Generative(HasMemoized): ... -class InPlaceGenerative(HasMemoized): ... -class HasCompileState(Generative): ... - -class _MetaOptions(type): - def __init__(cls, classname, bases, dict_) -> None: ... - def __add__(self, other): ... - -class Options(metaclass=_MetaOptions): - def __init__(self, **kw) -> None: ... - def __add__(self, other): ... - def __eq__(self, other): ... - @classmethod - def isinstance(cls, klass): ... - @hybridmethod - def add_to_element(self, name, value): ... - @classmethod - def safe_merge(cls, other): ... - @classmethod - def from_execution_options(cls, key, attrs, exec_options, statement_exec_options): ... - -class CacheableOptions(Options, HasCacheKey): ... - -class ExecutableOption(HasCopyInternals): - __visit_name__: str - -class Executable(roles.StatementRole, Generative): - supports_execution: bool - is_select: bool - is_update: bool - is_insert: bool - is_text: bool - is_delete: bool - is_dml: bool - def options(self, *options) -> Self: ... - def execution_options(self, **kw) -> Self: ... - def get_execution_options(self): ... - def execute(self, *multiparams, **params): ... - def scalar(self, *multiparams, **params): ... - @property - def bind(self): ... - -class prefix_anon_map(dict[Any, Any]): - def __missing__(self, key): ... - -class SchemaEventTarget: - dispatch: Incomplete - -class SchemaVisitor(ClauseVisitor): - __traverse_options__: Any - -class ColumnCollection: - def __init__(self, columns: Incomplete | None = None) -> None: ... - def keys(self): ... - def values(self): ... - def items(self): ... - def __bool__(self) -> bool: ... - def __len__(self) -> int: ... - def __iter__(self): ... - def __getitem__(self, key): ... - def __getattr__(self, key: str): ... - def __contains__(self, key): ... - def compare(self, other): ... - def __eq__(self, other): ... - def get(self, key, default: Incomplete | None = None): ... - def __setitem__(self, key, value) -> None: ... - def __delitem__(self, key) -> None: ... - def __setattr__(self, key: str, obj) -> None: ... - def clear(self) -> None: ... - def remove(self, column) -> None: ... - def update(self, iter_) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def add(self, column, key: Incomplete | None = None) -> None: ... - def contains_column(self, col): ... - def as_immutable(self): ... - def corresponding_column(self, column, require_embedded: bool = False): ... - -class DedupeColumnCollection(ColumnCollection): - def add(self, column, key: Incomplete | None = None) -> None: ... - def extend(self, iter_) -> None: ... - def remove(self, column) -> None: ... - def replace(self, column) -> None: ... - -class ImmutableColumnCollection(util.ImmutableContainer, ColumnCollection): - def __init__(self, collection) -> None: ... - add: Any - extend: Any - remove: Any - -class ColumnSet(util.ordered_column_set[ColumnElement[Any]]): - def contains_column(self, col): ... - def extend(self, cols) -> None: ... - def __add__(self, other): ... - def __eq__(self, other): ... - def __hash__(self) -> int: ... # type: ignore[override] diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi deleted file mode 100644 index 605ed309ac66..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi +++ /dev/null @@ -1,74 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . import roles - -elements: Any -lambdas: Any -schema: Any -selectable: Any -sqltypes: Any -traversals: Any - -def expect( - role, - element, - apply_propagate_attrs: Incomplete | None = None, - argname: Incomplete | None = None, - post_inspect: bool = False, - **kw, -): ... -def expect_as_key(role, element, **kw): ... -def expect_col_expression_collection(role, expressions) -> None: ... - -class RoleImpl: - name: Any - def __init__(self, role_class) -> None: ... - -class _Deannotate: ... -class _StringOnly: ... -class _ReturnsStringKey: ... -class _ColumnCoercions: ... -class _NoTextCoercion: ... -class _CoerceLiterals: ... -class LiteralValueImpl(RoleImpl): ... -class _SelectIsNotFrom: ... -class HasCacheKeyImpl(RoleImpl): ... -class ExecutableOptionImpl(RoleImpl): ... -class ExpressionElementImpl(_ColumnCoercions, RoleImpl): ... -class BinaryElementImpl(ExpressionElementImpl, RoleImpl): ... -class InElementImpl(RoleImpl): ... -class OnClauseImpl(_CoerceLiterals, _ColumnCoercions, RoleImpl): ... -class WhereHavingImpl(_CoerceLiterals, _ColumnCoercions, RoleImpl): ... -class StatementOptionImpl(_CoerceLiterals, RoleImpl): ... -class ColumnArgumentImpl(_NoTextCoercion, RoleImpl): ... -class ColumnArgumentOrKeyImpl(_ReturnsStringKey, RoleImpl): ... -class StrAsPlainColumnImpl(_CoerceLiterals, RoleImpl): ... -class ByOfImpl(_CoerceLiterals, _ColumnCoercions, RoleImpl, roles.ByOfRole): ... -class OrderByImpl(ByOfImpl, RoleImpl): ... -class GroupByImpl(ByOfImpl, RoleImpl): ... -class DMLColumnImpl(_ReturnsStringKey, RoleImpl): ... -class ConstExprImpl(RoleImpl): ... -class TruncatedLabelImpl(_StringOnly, RoleImpl): ... -class DDLExpressionImpl(_Deannotate, _CoerceLiterals, RoleImpl): ... -class DDLConstraintColumnImpl(_Deannotate, _ReturnsStringKey, RoleImpl): ... -class DDLReferredColumnImpl(DDLConstraintColumnImpl): ... -class LimitOffsetImpl(RoleImpl): ... -class LabeledColumnExprImpl(ExpressionElementImpl): ... -class ColumnsClauseImpl(_SelectIsNotFrom, _CoerceLiterals, RoleImpl): ... -class ReturnsRowsImpl(RoleImpl): ... -class StatementImpl(_CoerceLiterals, RoleImpl): ... -class SelectStatementImpl(_NoTextCoercion, RoleImpl): ... -class HasCTEImpl(ReturnsRowsImpl): ... -class IsCTEImpl(RoleImpl): ... -class JoinTargetImpl(RoleImpl): ... -class FromClauseImpl(_SelectIsNotFrom, _NoTextCoercion, RoleImpl): ... -class StrictFromClauseImpl(FromClauseImpl): ... -class AnonymizedFromClauseImpl(StrictFromClauseImpl): ... -class DMLTableImpl(_SelectIsNotFrom, _NoTextCoercion, RoleImpl): ... -class DMLSelectImpl(_NoTextCoercion, RoleImpl): ... -class CompoundElementImpl(_NoTextCoercion, RoleImpl): ... - -cls: Any -name: Any -impl: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi deleted file mode 100644 index 53762e3ac3f4..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi +++ /dev/null @@ -1,487 +0,0 @@ -from _typeshed import Incomplete -from typing import NamedTuple - -from ..util import EnsureKWArgType, memoized_property -from .base import CompileState -from .elements import ColumnElement - -RESERVED_WORDS: Incomplete -LEGAL_CHARACTERS: Incomplete -LEGAL_CHARACTERS_PLUS_SPACE: Incomplete -ILLEGAL_INITIAL_CHARACTERS: Incomplete -FK_ON_DELETE: Incomplete -FK_ON_UPDATE: Incomplete -FK_INITIALLY: Incomplete -BIND_PARAMS: Incomplete -BIND_PARAMS_ESC: Incomplete -BIND_TEMPLATES: Incomplete -OPERATORS: Incomplete -FUNCTIONS: Incomplete -EXTRACT_MAP: Incomplete -COMPOUND_KEYWORDS: Incomplete -RM_RENDERED_NAME: int -RM_NAME: int -RM_OBJECTS: int -RM_TYPE: int - -class ExpandedState(NamedTuple): - statement: Incomplete - additional_parameters: Incomplete - processors: Incomplete - positiontup: Incomplete - parameter_expansion: Incomplete - -NO_LINTING: Incomplete -COLLECT_CARTESIAN_PRODUCTS: Incomplete -WARN_LINTING: Incomplete -FROM_LINTING: Incomplete - -class FromLinter: - def lint(self, start: Incomplete | None = None): ... - def warn(self) -> None: ... - -class Compiled: - schema_translate_map: Incomplete - execution_options: Incomplete - compile_state: Incomplete - dml_compile_state: CompileState | None - cache_key: Incomplete - dialect: Incomplete - preparer: Incomplete - statement: Incomplete - can_execute: Incomplete - string: Incomplete - def __init__( - self, - dialect, - statement, - schema_translate_map: Incomplete | None = None, - render_schema_translate: bool = False, - compile_kwargs=..., - ) -> None: ... - def visit_unsupported_compilation(self, element, err) -> None: ... - @property - def sql_compiler(self) -> None: ... - def process(self, obj, **kwargs): ... - def construct_params( - self, params: Incomplete | None = None, extracted_parameters: Incomplete | None = None, escape_names: bool = True - ) -> None: ... - @property - def params(self): ... - -class TypeCompiler(metaclass=EnsureKWArgType): - ensure_kwarg: str - dialect: Incomplete - def __init__(self, dialect) -> None: ... - def process(self, type_, **kw): ... - def visit_unsupported_compilation(self, element, err, **kw) -> None: ... - -class _CompileLabel(ColumnElement[Incomplete]): - __visit_name__: str - element: Incomplete - name: Incomplete - def __init__(self, col, name, alt_names=()) -> None: ... - @property - def proxy_set(self): ... - @property - def type(self): ... - def self_group(self, **kw): ... - -class SQLCompiler(Compiled): - extract_map: Incomplete - compound_keywords: Incomplete - isdelete: bool - isinsert: bool - isupdate: bool - isplaintext: bool - returning: Incomplete - returning_precedes_values: bool - render_table_with_column_in_update_from: bool - ansi_bind_rules: bool - insert_single_values_expr: Incomplete - literal_execute_params: Incomplete - post_compile_params: Incomplete - escaped_bind_names: Incomplete - has_out_parameters: bool - insert_prefetch: Incomplete - update_prefetch: Incomplete - postfetch_lastrowid: bool - positiontup: Incomplete - positiontup_level: dict[str, int] | None - inline: bool - column_keys: Incomplete - cache_key: Incomplete - for_executemany: Incomplete - linting: Incomplete - binds: Incomplete - bind_names: Incomplete - stack: Incomplete - positional: Incomplete - bindtemplate: Incomplete - ctes: Incomplete - label_length: Incomplete - anon_map: Incomplete - truncated_names: Incomplete - def __init__( - self, - dialect, - statement, - cache_key: Incomplete | None = None, - column_keys: Incomplete | None = None, - for_executemany: bool = False, - linting=..., - **kwargs, - ) -> None: ... - @property - def current_executable(self): ... - @property - def prefetch(self): ... - def is_subquery(self): ... - @property - def sql_compiler(self): ... - def construct_params(self, params: Incomplete | None = None, _group_number: Incomplete | None = None, _check: bool = True, extracted_parameters: Incomplete | None = None, escape_names: bool = True): ... # type: ignore[override] - @property - def params(self): ... - def default_from(self): ... - def visit_grouping(self, grouping, asfrom: bool = False, **kwargs): ... - def visit_select_statement_grouping(self, grouping, **kwargs): ... - def visit_label_reference(self, element, within_columns_clause: bool = False, **kwargs): ... - def visit_textual_label_reference(self, element, within_columns_clause: bool = False, **kwargs): ... - def visit_label( - self, - label, - add_to_result_map: Incomplete | None = None, - within_label_clause: bool = False, - within_columns_clause: bool = False, - render_label_as_label: Incomplete | None = None, - result_map_targets=(), - **kw, - ): ... - def visit_lambda_element(self, element, **kw): ... - def visit_column( - self, column, add_to_result_map: Incomplete | None = None, include_table: bool = True, result_map_targets=(), **kwargs - ): ... - def visit_collation(self, element, **kw): ... - 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 escape_literal_column(self, text): ... - def visit_textclause(self, textclause, add_to_result_map: Incomplete | None = None, **kw): ... - def visit_textual_select(self, taf, compound_index: Incomplete | None = None, asfrom: bool = False, **kw): ... - def visit_null(self, expr, **kw): ... - def visit_true(self, expr, **kw): ... - def visit_false(self, expr, **kw): ... - def visit_tuple(self, clauselist, **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_scalar_function_column(self, element, **kw): ... - def visit_function(self, func, add_to_result_map: Incomplete | None = None, **kwargs): ... - def visit_next_value_func(self, next_value, **kw): ... - def visit_sequence(self, sequence, **kw) -> None: ... - def function_argspec(self, func, **kwargs): ... - compile_state: Incomplete - def visit_compound_select(self, cs, asfrom: bool = False, compound_index: Incomplete | None = None, **kwargs): ... - def visit_unary(self, unary, add_to_result_map: Incomplete | None = None, result_map_targets=(), **kw): ... - def visit_is_true_unary_operator(self, element, operator, **kw): ... - def visit_is_false_unary_operator(self, element, operator, **kw): ... - def visit_not_match_op_binary(self, binary, operator, **kw): ... - def visit_not_in_op_binary(self, binary, operator, **kw): ... - def visit_empty_set_op_expr(self, type_, expand_op): ... - def visit_empty_set_expr(self, element_types) -> None: ... - def visit_binary( - self, - binary, - override_operator: Incomplete | None = None, - eager_grouping: bool = False, - from_linter: Incomplete | None = None, - lateral_from_linter: Incomplete | None = None, - **kw, - ): ... - def visit_function_as_comparison_op_binary(self, element, operator, **kw): ... - def visit_mod_binary(self, binary, operator, **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_not_contains_op_binary(self, binary, operator, **kw): ... - def visit_startswith_op_binary(self, binary, operator, **kw): ... - def visit_not_startswith_op_binary(self, binary, operator, **kw): ... - def visit_endswith_op_binary(self, binary, operator, **kw): ... - def visit_not_endswith_op_binary(self, binary, operator, **kw): ... - def visit_like_op_binary(self, binary, operator, **kw): ... - def visit_not_like_op_binary(self, binary, operator, **kw): ... - def visit_ilike_op_binary(self, binary, operator, **kw): ... - def visit_not_ilike_op_binary(self, binary, operator, **kw): ... - def visit_between_op_binary(self, binary, operator, **kw): ... - def visit_not_between_op_binary(self, binary, operator, **kw): ... - def visit_regexp_match_op_binary(self, binary, operator, **kw) -> None: ... - def visit_not_regexp_match_op_binary(self, binary, operator, **kw) -> None: ... - def visit_regexp_replace_op_binary(self, binary, operator, **kw) -> None: ... - def visit_bindparam( - self, - bindparam, - within_columns_clause: bool = False, - literal_binds: bool = False, - skip_bind_expression: bool = False, - literal_execute: bool = False, - render_postcompile: bool = False, - **kwargs, - ): ... - def render_literal_bindparam( - self, bindparam, render_literal_value=..., bind_expression_template: Incomplete | None = None, **kw - ): ... - def render_literal_value(self, value, type_): ... - def bindparam_string( - self, - name, - positional_names: Incomplete | None = None, - post_compile: bool = False, - expanding: bool = False, - escaped_from: Incomplete | None = None, - **kw, - ): ... - execution_options: Incomplete - ctes_recursive: bool - def visit_cte( - self, - cte, - asfrom: bool = False, - ashint: bool = False, - fromhints: Incomplete | None = None, - visiting_cte: Incomplete | None = None, - from_linter: Incomplete | None = None, - **kwargs, - ): ... - def visit_table_valued_alias(self, element, **kw): ... - def visit_table_valued_column(self, element, **kw): ... - def visit_alias( - self, - alias, - asfrom: bool = False, - ashint: bool = False, - iscrud: bool = False, - fromhints: Incomplete | None = None, - subquery: bool = False, - lateral: bool = False, - enclosing_alias: Incomplete | None = None, - from_linter: Incomplete | None = None, - **kwargs, - ): ... - def visit_subquery(self, subquery, **kw): ... - def visit_lateral(self, lateral_, **kw): ... - def visit_tablesample(self, tablesample, asfrom: bool = False, **kw): ... - def visit_values(self, element, asfrom: bool = False, from_linter: Incomplete | None = None, **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) -> None: ... - def get_from_hint_text(self, table, text) -> None: ... - def get_crud_hint_text(self, table, text) -> None: ... - def get_statement_hint_text(self, hint_texts): ... - translate_select_structure: Incomplete - def visit_select( - self, - select_stmt, - asfrom: bool = False, - insert_into: bool = False, - fromhints: Incomplete | None = None, - compound_index: Incomplete | None = None, - select_wraps_for: Incomplete | None = None, - lateral: bool = False, - from_linter: Incomplete | None = None, - **kwargs, - ): ... - def get_cte_preamble(self, recursive): ... - def get_select_precolumns(self, select, **kw): ... - def group_by_clause(self, select, **kw): ... - def order_by_clause(self, select, **kw): ... - def for_update_clause(self, select, **kw): ... - def returning_clause(self, stmt, returning_cols) -> None: ... - def limit_clause(self, select, **kw): ... - def fetch_clause(self, select, **kw): ... - def visit_table( - self, - table, - asfrom: bool = False, - iscrud: bool = False, - ashint: bool = False, - fromhints: Incomplete | None = None, - use_schema: bool = True, - from_linter: Incomplete | None = None, - **kwargs, - ): ... - def visit_join(self, join, asfrom: bool = False, from_linter: Incomplete | None = None, **kwargs): ... - def visit_insert(self, insert_stmt, **kw): ... - def update_limit_clause(self, update_stmt) -> None: ... - 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) -> None: ... - def visit_update(self, update_stmt, **kw): ... - def delete_extra_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw) -> None: ... - def delete_table_clause(self, delete_stmt, from_table, extra_froms): ... - def visit_delete(self, delete_stmt, **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_unsupported_compilation(self, element, err, **kw): ... - 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 visit_sequence(self, seq, **kw): ... - def returning_clause(self, stmt, returning_cols): ... - def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... - def delete_extra_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... - def visit_empty_set_expr(self, type_): ... - def get_from_hint_text(self, table, text): ... - def visit_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ... - def visit_regexp_replace_op_binary(self, binary, operator, **kw): ... - -class DDLCompiler(Compiled): - @memoized_property - def sql_compiler(self): ... - @memoized_property - def type_compiler(self): ... - def construct_params( - self, params: Incomplete | None = None, extracted_parameters: Incomplete | None = None, escape_names: bool = True - ) -> None: ... - def visit_ddl(self, ddl, **kwargs): ... - def visit_create_schema(self, create, **kw): ... - def visit_drop_schema(self, drop, **kw): ... - def visit_create_table(self, create, **kw): ... - def visit_create_column(self, create, first_pk: bool = False, **kw): ... - def create_table_constraints(self, table, _include_foreign_key_constraints: Incomplete | None = None, **kw): ... - def visit_drop_table(self, drop, **kw): ... - def visit_drop_view(self, drop, **kw): ... - def visit_create_index(self, create, include_schema: bool = False, include_table_schema: bool = True, **kw): ... - def visit_drop_index(self, drop, **kw): ... - def visit_add_constraint(self, create, **kw): ... - def visit_set_table_comment(self, create, **kw): ... - def visit_drop_table_comment(self, drop, **kw): ... - def visit_set_column_comment(self, create, **kw): ... - def visit_drop_column_comment(self, drop, **kw): ... - def get_identity_options(self, identity_options): ... - def visit_create_sequence(self, create, prefix: Incomplete | None = None, **kw): ... - def visit_drop_sequence(self, drop, **kw): ... - def visit_drop_constraint(self, drop, **kw): ... - 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_table_or_column_check_constraint(self, constraint, **kw): ... - def visit_check_constraint(self, constraint, **kw): ... - def visit_column_check_constraint(self, constraint, **kw): ... - def visit_primary_key_constraint(self, constraint, **kw): ... - def visit_foreign_key_constraint(self, constraint, **kw): ... - def define_constraint_remote_table(self, constraint, table, preparer): ... - def visit_unique_constraint(self, constraint, **kw): ... - def define_constraint_cascades(self, constraint): ... - def define_constraint_deferrability(self, constraint): ... - def define_constraint_match(self, constraint): ... - def visit_computed_column(self, generated, **kw): ... - def visit_identity_column(self, identity, **kw): ... - -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) -> None: ... - def visit_type_decorator(self, type_, **kw): ... - def visit_user_defined(self, type_, **kw): ... - -class StrSQLTypeCompiler(GenericTypeCompiler): - def process(self, type_, **kw): ... - def __getattr__(self, key: str): ... - def visit_null(self, type_, **kw): ... - def visit_user_defined(self, type_, **kw): ... - -class IdentifierPreparer: - reserved_words: Incomplete - legal_characters: Incomplete - illegal_initial_characters: Incomplete - schema_for_object: Incomplete - dialect: Incomplete - initial_quote: Incomplete - final_quote: Incomplete - escape_quote: Incomplete - escape_to_quote: Incomplete - omit_schema: Incomplete - quote_case_sensitive_collations: Incomplete - def __init__( - self, - dialect, - initial_quote: str = '"', - final_quote: Incomplete | None = None, - escape_quote: str = '"', - quote_case_sensitive_collations: bool = True, - omit_schema: bool = False, - ) -> None: ... - def validate_sql_phrase(self, element, reg): ... - def quote_identifier(self, value): ... - def quote_schema(self, schema, force: Incomplete | None = None): ... - def quote(self, ident, force: Incomplete | None = None): ... - def format_collation(self, collation_name): ... - def format_sequence(self, sequence, use_schema: bool = True): ... - def format_label(self, label, name: Incomplete | None = None): ... - def format_alias(self, alias, name: Incomplete | None = None): ... - def format_savepoint(self, savepoint, name: Incomplete | None = None): ... - def format_constraint(self, constraint, _alembic_quote: bool = True): ... - def truncate_and_render_index_name(self, name, _alembic_quote: bool = True): ... - def truncate_and_render_constraint_name(self, name, _alembic_quote: bool = True): ... - def format_index(self, index): ... - def format_table(self, table, use_schema: bool = True, name: Incomplete | None = None): ... - def format_schema(self, name): ... - def format_label_name(self, name, anon_map: Incomplete | None = None): ... - def format_column( - self, - column, - use_table: bool = False, - name: Incomplete | None = None, - table_name: Incomplete | None = None, - use_schema: bool = False, - anon_map: Incomplete | None = None, - ): ... - def format_table_seq(self, table, use_schema: bool = True): ... - def unformat_identifiers(self, identifiers): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/crud.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/crud.pyi deleted file mode 100644 index a13be2f00848..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/crud.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Any, Generic, TypeVar - -from . import elements -from .operators import ColumnOperators - -_T = TypeVar("_T") - -REQUIRED: Any - -class _multiparam_column(elements.ColumnElement[_T], Generic[_T]): - index: Any - key: Any - original: Any - default: Any - type: Any - def __init__(self, original, index) -> None: ... - def compare(self, other, **kw) -> None: ... - def __eq__(self, other) -> ColumnOperators[_T]: ... # type: ignore[override] diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi deleted file mode 100644 index 4749fedd2bba..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi +++ /dev/null @@ -1,155 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . import roles -from .base import Executable, SchemaVisitor -from .elements import ClauseElement - -class _DDLCompiles(ClauseElement): ... - -class DDLElement(roles.DDLRole, Executable, _DDLCompiles): - target: Any - on: Any - dialect: Any - callable_: Any - def execute(self, bind: Incomplete | None = None, target: Incomplete | None = None): ... # type: ignore[override] - def against(self, target) -> None: ... - state: Any - def execute_if( - self, dialect: Incomplete | None = None, callable_: Incomplete | None = None, state: Incomplete | None = None - ) -> None: ... - def __call__(self, target, bind, **kw): ... - bind: Any - -class DDL(DDLElement): - __visit_name__: str - statement: Any - context: Any - def __init__(self, statement, context: Incomplete | None = None, bind: Incomplete | None = None) -> None: ... - -class _CreateDropBase(DDLElement): - element: Any - bind: Any - if_exists: Any - if_not_exists: Any - def __init__( - self, - element, - bind: Incomplete | None = None, - if_exists: bool = False, - if_not_exists: bool = False, - _legacy_bind: Incomplete | None = None, - ) -> None: ... - @property - def stringify_dialect(self): ... - -class CreateSchema(_CreateDropBase): - __visit_name__: str - quote: Any - def __init__(self, name, quote: Incomplete | None = None, **kw) -> None: ... - -class DropSchema(_CreateDropBase): - __visit_name__: str - quote: Any - cascade: Any - def __init__(self, name, quote: Incomplete | None = None, cascade: bool = False, **kw) -> None: ... - -class CreateTable(_CreateDropBase): - __visit_name__: str - columns: Any - include_foreign_key_constraints: Any - def __init__( - self, - element, - bind: Incomplete | None = None, - include_foreign_key_constraints: Incomplete | None = None, - if_not_exists: bool = False, - ) -> None: ... - -class _DropView(_CreateDropBase): - __visit_name__: str - -class CreateColumn(_DDLCompiles): - __visit_name__: str - element: Any - def __init__(self, element) -> None: ... - -class DropTable(_CreateDropBase): - __visit_name__: str - def __init__(self, element, bind: Incomplete | None = None, if_exists: bool = False) -> None: ... - -class CreateSequence(_CreateDropBase): - __visit_name__: str - -class DropSequence(_CreateDropBase): - __visit_name__: str - -class CreateIndex(_CreateDropBase): - __visit_name__: str - def __init__(self, element, bind: Incomplete | None = None, if_not_exists: bool = False) -> None: ... - -class DropIndex(_CreateDropBase): - __visit_name__: str - def __init__(self, element, bind: Incomplete | None = None, if_exists: bool = False) -> None: ... - -class AddConstraint(_CreateDropBase): - __visit_name__: str - def __init__(self, element, *args, **kw) -> None: ... - -class DropConstraint(_CreateDropBase): - __visit_name__: str - cascade: Any - def __init__(self, element, cascade: bool = False, **kw) -> None: ... - -class SetTableComment(_CreateDropBase): - __visit_name__: str - -class DropTableComment(_CreateDropBase): - __visit_name__: str - -class SetColumnComment(_CreateDropBase): - __visit_name__: str - -class DropColumnComment(_CreateDropBase): - __visit_name__: str - -class DDLBase(SchemaVisitor): - connection: Any - def __init__(self, connection) -> None: ... - -class SchemaGenerator(DDLBase): - checkfirst: Any - tables: Any - preparer: Any - dialect: Any - memo: Any - def __init__(self, dialect, connection, checkfirst: bool = False, tables: Incomplete | None = None, **kwargs) -> None: ... - def visit_metadata(self, metadata) -> None: ... - def visit_table( - self, - table, - create_ok: bool = False, - include_foreign_key_constraints: Incomplete | None = None, - _is_metadata_operation: bool = False, - ) -> None: ... - def visit_foreign_key_constraint(self, constraint) -> None: ... - def visit_sequence(self, sequence, create_ok: bool = False) -> None: ... - def visit_index(self, index, create_ok: bool = False) -> None: ... - -class SchemaDropper(DDLBase): - checkfirst: Any - tables: Any - preparer: Any - dialect: Any - memo: Any - def __init__(self, dialect, connection, checkfirst: bool = False, tables: Incomplete | None = None, **kwargs) -> None: ... - def visit_metadata(self, metadata): ... - def visit_index(self, index, drop_ok: bool = False) -> None: ... - def visit_table(self, table, drop_ok: bool = False, _is_metadata_operation: bool = False, _ignore_sequences=()) -> None: ... - def visit_foreign_key_constraint(self, constraint) -> None: ... - def visit_sequence(self, sequence, drop_ok: bool = False) -> None: ... - -def sort_tables(tables, skip_fn: Incomplete | None = None, extra_dependencies: Incomplete | None = None): ... -def sort_tables_and_constraints( - tables, filter_fn: Incomplete | None = None, extra_dependencies: Incomplete | None = None, _warn_for_cycles: bool = False -): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/default_comparator.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/default_comparator.pyi deleted file mode 100644 index ac514fdf0146..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/default_comparator.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -operator_lookup: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi deleted file mode 100644 index 518c88b8468f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi +++ /dev/null @@ -1,120 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . import roles -from .base import CompileState, DialectKWArgs, Executable, HasCompileState -from .elements import ClauseElement -from .selectable import HasCTE, HasPrefixes, ReturnsRows - -class DMLState(CompileState): - isupdate: bool - isdelete: bool - isinsert: bool - def __init__(self, statement, compiler, **kw) -> None: ... - @property - def dml_table(self): ... - @classmethod - def get_entity_description(cls, statement) -> dict[str, Incomplete]: ... - @classmethod - def get_returning_column_descriptions(cls, statement) -> list[dict[str, Incomplete]]: ... - -class InsertDMLState(DMLState): - isinsert: bool - include_table_with_column_exprs: bool - statement: Any - def __init__(self, statement, compiler, **kw) -> None: ... - -class UpdateDMLState(DMLState): - isupdate: bool - include_table_with_column_exprs: bool - statement: Any - is_multitable: Any - def __init__(self, statement, compiler, **kw) -> None: ... - -class DeleteDMLState(DMLState): - isdelete: bool - statement: Any - def __init__(self, statement, compiler, **kw) -> None: ... - -class UpdateBase(roles.DMLRole, HasCTE, HasCompileState, DialectKWArgs, HasPrefixes, ReturnsRows, Executable, ClauseElement): - __visit_name__: str - named_with_column: bool - is_dml: bool - def params(self, *arg, **kw) -> None: ... - def with_dialect_options(self, **opt) -> None: ... - bind: Any - def returning(self, *cols) -> None: ... - @property - def exported_columns(self): ... - def with_hint(self, text, selectable: Incomplete | None = None, dialect_name: str = "*") -> None: ... - @property - def entity_description(self): ... - @property - def returning_column_descriptions(self): ... - -class ValuesBase(UpdateBase): - __visit_name__: str - select: Any - table: Any - def __init__(self, table, values, prefixes) -> None: ... - def values(self, *args, **kwargs) -> None: ... - def return_defaults(self, *cols) -> None: ... - -class Insert(ValuesBase): - __visit_name__: str - select: Any - include_insert_from_select_defaults: bool - is_insert: bool - def __init__( - self, - table, - values: Incomplete | None = None, - inline: bool = False, - bind: Incomplete | None = None, - prefixes: Incomplete | None = None, - returning: Incomplete | None = None, - return_defaults: bool = False, - **dialect_kw, - ) -> None: ... - def inline(self) -> None: ... - def from_select(self, names, select, include_defaults: bool = True) -> None: ... - -class DMLWhereBase: - def where(self, *whereclause) -> None: ... - def filter(self, *criteria): ... - def filter_by(self, **kwargs): ... - @property - def whereclause(self): ... - -class Update(DMLWhereBase, ValuesBase): - __visit_name__: str - is_update: bool - def __init__( - self, - table, - whereclause: Incomplete | None = None, - values: Incomplete | None = None, - inline: bool = False, - bind: Incomplete | None = None, - prefixes: Incomplete | None = None, - returning: Incomplete | None = None, - return_defaults: bool = False, - preserve_parameter_order: bool = False, - **dialect_kw, - ) -> None: ... - def ordered_values(self, *args) -> None: ... - def inline(self) -> None: ... - -class Delete(DMLWhereBase, UpdateBase): - __visit_name__: str - is_delete: bool - table: Any - def __init__( - self, - table, - whereclause: Incomplete | None = None, - bind: Incomplete | None = None, - returning: Incomplete | None = None, - prefixes: Incomplete | None = None, - **dialect_kw, - ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi deleted file mode 100644 index 454f33396a51..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi +++ /dev/null @@ -1,473 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, TypeVar -from typing_extensions import Literal, Self - -from .. import util -from ..util.langhelpers import HasMemoized, memoized_property -from . import operators, roles -from .annotation import Annotated, SupportsWrappingAnnotations -from .base import Executable, Immutable, SingletonConstant -from .traversals import HasCopyInternals, MemoizedHasCacheKey -from .visitors import Traversible - -_T = TypeVar("_T") - -def collate(expression, collation): ... -def between(expr, lower_bound, upper_bound, symmetric: bool = False): ... -def literal(value, type_: Incomplete | None = None): ... -def outparam(key, type_: Incomplete | None = None): ... -def not_(clause): ... - -class ClauseElement(roles.SQLRole, SupportsWrappingAnnotations, MemoizedHasCacheKey, HasCopyInternals, Traversible): - __visit_name__: str - supports_execution: bool - stringify_dialect: str - bind: Any - description: Any - is_clause_element: bool - is_selectable: bool - @property - def entity_namespace(self) -> None: ... - def unique_params(self, *optionaldict, **kwargs): ... - def params(self, *optionaldict, **kwargs): ... - def compare(self, other, **kw): ... - def self_group(self, against: Incomplete | None = None): ... - def compile(self, bind: Incomplete | None = None, dialect: Incomplete | None = None, **kw): ... - def __invert__(self): ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - -class ColumnElement( - roles.ColumnArgumentOrKeyRole, - roles.StatementOptionRole, - roles.WhereHavingRole, - roles.BinaryElementRole, - roles.OrderByRole, - roles.ColumnsClauseRole, - roles.LimitOffsetRole, - roles.DMLColumnRole, - roles.DDLConstraintColumnRole, - roles.DDLExpressionRole, - operators.ColumnOperators[_T], - ClauseElement, - Generic[_T], -): - __visit_name__: str - primary_key: bool - foreign_keys: Any - key: Any - def self_group(self, against: Incomplete | None = None): ... - @memoized_property - def type(self): ... - @HasMemoized.memoized_attribute - def comparator(self): ... - def __getattr__(self, key: str): ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... - @property - def expression(self): ... - @memoized_property - def base_columns(self): ... - @memoized_property - def proxy_set(self): ... - def shares_lineage(self, othercolumn): ... - def cast(self, type_): ... - def label(self, name): ... - @property - def anon_label(self): ... - @property - def anon_key_label(self): ... - -class WrapsColumnExpression: - @property - def wrapped_column_expression(self) -> None: ... - -class BindParameter(roles.InElementRole, ColumnElement[_T], Generic[_T]): - __visit_name__: str - inherit_cache: bool - key: Any - unique: Any - value: Any - callable: Any - isoutparam: Any - required: Any - expanding: Any - expand_op: Any - literal_execute: Any - type: Any - def __init__( - self, - key, - value=..., - type_: Incomplete | None = None, - unique: bool = False, - required=..., - quote: Incomplete | None = None, - callable_: Incomplete | None = None, - expanding: bool = False, - isoutparam: bool = False, - literal_execute: bool = False, - _compared_to_operator: Incomplete | None = None, - _compared_to_type: Incomplete | None = None, - _is_crud: bool = False, - ) -> None: ... - @property - def effective_value(self): ... - def render_literal_execute(self): ... - -class TypeClause(ClauseElement): - __visit_name__: str - type: Any - def __init__(self, type_) -> None: ... - -class TextClause( - roles.DDLConstraintColumnRole, - roles.DDLExpressionRole, - roles.StatementOptionRole, - roles.WhereHavingRole, - roles.OrderByRole, - roles.FromClauseRole, - roles.SelectStatementRole, - roles.BinaryElementRole, - roles.InElementRole, - Executable, - ClauseElement, -): - __visit_name__: str - def __and__(self, other): ... - key: Any - text: Any - def __init__(self, text: str, bind: Incomplete | None = None) -> None: ... - def bindparams(self, *binds, **names_to_values) -> Self: ... - def columns(self, *cols, **types): ... - @property - def type(self): ... - @property - def comparator(self): ... - def self_group(self, against: Incomplete | None = None): ... - -class Null(SingletonConstant, roles.ConstExprRole, ColumnElement[None]): - __visit_name__: str - @memoized_property - def type(self): ... - -class False_(SingletonConstant, roles.ConstExprRole, ColumnElement[Literal[False]]): - __visit_name__: str - @memoized_property - def type(self): ... - -class True_(SingletonConstant, roles.ConstExprRole, ColumnElement[Literal[True]]): - __visit_name__: str - @memoized_property - def type(self): ... - -class ClauseList(roles.InElementRole, roles.OrderByRole, roles.ColumnsClauseRole, roles.DMLColumnRole, ClauseElement): - __visit_name__: str - operator: Any - group: Any - group_contents: Any - clauses: Any - def __init__(self, *clauses, **kwargs) -> None: ... - def __iter__(self): ... - def __len__(self) -> int: ... - def append(self, clause) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - -class BooleanClauseList(ClauseList, ColumnElement[Any]): - __visit_name__: str - inherit_cache: bool - def __init__(self, *arg, **kw) -> None: ... - @classmethod - def and_(cls, *clauses): ... - @classmethod - def or_(cls, *clauses): ... - def self_group(self, against: Incomplete | None = None): ... - -and_: Any -or_: Any - -class Tuple(ClauseList, ColumnElement[Any]): - __visit_name__: str - type: Any - def __init__(self, *clauses, **kw) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - -class Case(ColumnElement[Any]): - __visit_name__: str - value: Any - type: Any - whens: Any - else_: Any - def __init__(self, *whens, **kw) -> None: ... - -def literal_column(text, type_: Incomplete | None = None): ... - -class Cast(WrapsColumnExpression, ColumnElement[Any]): - __visit_name__: str - type: Any - clause: Any - typeclause: Any - def __init__(self, expression, type_) -> None: ... - @property - def wrapped_column_expression(self): ... - -class TypeCoerce(WrapsColumnExpression, ColumnElement[Any]): - __visit_name__: str - type: Any - clause: Any - def __init__(self, expression, type_) -> None: ... - @HasMemoized.memoized_attribute - def typed_expression(self): ... - @property - def wrapped_column_expression(self): ... - def self_group(self, against: Incomplete | None = None): ... - -class Extract(ColumnElement[Any]): - __visit_name__: str - type: Any - field: Any - expr: Any - def __init__(self, field, expr, **kwargs) -> None: ... - -class _label_reference(ColumnElement[Any]): - __visit_name__: str - element: Any - def __init__(self, element) -> None: ... - -class _textual_label_reference(ColumnElement[Any]): - __visit_name__: str - element: Any - def __init__(self, element) -> None: ... - -class UnaryExpression(ColumnElement[Any]): - __visit_name__: str - operator: Any - modifier: Any - element: Any - type: Any - wraps_column_expression: Any - def __init__( - self, - element, - operator: Incomplete | None = None, - modifier: Incomplete | None = None, - type_: Incomplete | None = None, - wraps_column_expression: bool = False, - ) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - -class CollectionAggregate(UnaryExpression): - inherit_cache: bool - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs) -> None: ... - -class AsBoolean(WrapsColumnExpression, UnaryExpression): - inherit_cache: bool - element: Any - type: Any - operator: Any - negate: Any - modifier: Any - wraps_column_expression: bool - def __init__(self, element, operator, negate) -> None: ... - @property - def wrapped_column_expression(self): ... - def self_group(self, against: Incomplete | None = None): ... - -class BinaryExpression(ColumnElement[Any]): - __visit_name__: str - left: Any - right: Any - operator: Any - type: Any - negate: Any - modifiers: Any - def __init__( - self, - left, - right, - operator, - type_: Incomplete | None = None, - negate: Incomplete | None = None, - modifiers: Incomplete | None = None, - ) -> None: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - @property - def is_comparison(self): ... - def self_group(self, against: Incomplete | None = None): ... - -class Slice(ColumnElement[Any]): - __visit_name__: str - start: Any - stop: Any - step: Any - type: Any - def __init__(self, start, stop, step, _name: Incomplete | None = None) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - -class IndexExpression(BinaryExpression): - inherit_cache: bool - -class GroupedElement(ClauseElement): - __visit_name__: str - def self_group(self, against: Incomplete | None = None): ... - -class Grouping(GroupedElement, ColumnElement[Any]): - element: Any - type: Any - def __init__(self, element) -> None: ... - def __getattr__(self, attr: str): ... - -RANGE_UNBOUNDED: Any -RANGE_CURRENT: Any - -class Over(ColumnElement[Any]): - __visit_name__: str - order_by: Any - partition_by: Any - element: Any - range_: Any - rows: Any - def __init__( - self, - element, - partition_by: Incomplete | None = None, - order_by: Incomplete | None = None, - range_: Incomplete | None = None, - rows: Incomplete | None = None, - ) -> None: ... - def __reduce__(self): ... - @memoized_property - def type(self): ... - -class WithinGroup(ColumnElement[Any]): - __visit_name__: str - order_by: Any - element: Any - def __init__(self, element, *order_by) -> None: ... - def __reduce__(self): ... - def over( - self, - partition_by: Incomplete | None = None, - order_by: Incomplete | None = None, - range_: Incomplete | None = None, - rows: Incomplete | None = None, - ): ... - @memoized_property - def type(self): ... - -class FunctionFilter(ColumnElement[Any]): - __visit_name__: str - criterion: Any - func: Any - def __init__(self, func, *criterion) -> None: ... - def filter(self, *criterion): ... - def over( - self, - partition_by: Incomplete | None = None, - order_by: Incomplete | None = None, - range_: Incomplete | None = None, - rows: Incomplete | None = None, - ): ... - def self_group(self, against: Incomplete | None = None): ... - @memoized_property - def type(self): ... - -class Label(roles.LabeledColumnExprRole, ColumnElement[Any]): - __visit_name__: str - name: Any - key: Any - def __init__(self, name, element, type_: Incomplete | None = None) -> None: ... - def __reduce__(self): ... - @memoized_property - def type(self): ... - @HasMemoized.memoized_attribute - def element(self): ... - def self_group(self, against: Incomplete | None = None): ... - @property - def primary_key(self): ... - @property - def foreign_keys(self): ... - -class NamedColumn(ColumnElement[Any]): - is_literal: bool - table: Any - @memoized_property - def description(self): ... - -class ColumnClause(roles.DDLReferredColumnRole, roles.LabeledColumnExprRole, roles.StrAsPlainColumnRole, Immutable, NamedColumn): - table: Any - is_literal: bool - __visit_name__: str - onupdate: Any - default: Any - server_default: Any - server_onupdate: Any - key: Any - type: Any - def __init__( - self, text, type_: Incomplete | None = None, is_literal: bool = False, _selectable: Incomplete | None = None - ) -> None: ... - def get_children(self, column_tables: bool = False, **kw): ... # type: ignore[override] - @property - def entity_namespace(self): ... - -class TableValuedColumn(NamedColumn): - __visit_name__: str - scalar_alias: Any - key: Any - type: Any - def __init__(self, scalar_alias, type_) -> None: ... - -class CollationClause(ColumnElement[Any]): - __visit_name__: str - collation: Any - def __init__(self, collation) -> None: ... - -class _IdentifiedClause(Executable, ClauseElement): - __visit_name__: str - ident: Any - def __init__(self, ident) -> None: ... - -class SavepointClause(_IdentifiedClause): - __visit_name__: str - inherit_cache: bool - -class RollbackToSavepointClause(_IdentifiedClause): - __visit_name__: str - inherit_cache: bool - -class ReleaseSavepointClause(_IdentifiedClause): - __visit_name__: str - inherit_cache: bool - -class quoted_name(util.MemoizedSlots, util.text_type): - quote: Any - def __new__(cls, value, quote): ... - def __reduce__(self): ... - -class AnnotatedColumnElement(Annotated): - def __init__(self, element, values) -> None: ... - @property # Should be @memoized_property, but that causes issues with regr_test - def name(self): ... - @property # Should be @memoized_property, but that causes issues with regr_test - def table(self): ... - @property # Should be @memoized_property, but that causes issues with regr_test - def key(self): ... - @property # Should be @memoized_property, but that causes issues with regr_test - def info(self): ... - -class _truncated_label(quoted_name): - def __new__(cls, value, quote: Incomplete | None = None): ... - def __reduce__(self): ... - def apply_map(self, map_): ... - -class conv(_truncated_label): ... - -class _anonymous_label(_truncated_label): - @classmethod - def safe_construct(cls, seed, body, enclosing_label: Incomplete | None = None, sanitize_key: bool = False): ... - def __add__(self, other): ... - def __radd__(self, other): ... - def apply_map(self, map_): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/events.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/events.pyi deleted file mode 100644 index 11765c6af968..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/events.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from .. import event - -class DDLEvents(event.Events): - def before_create(self, target, connection, **kw) -> None: ... - def after_create(self, target, connection, **kw) -> None: ... - def before_drop(self, target, connection, **kw) -> None: ... - def after_drop(self, target, connection, **kw) -> None: ... - def before_parent_attach(self, target, parent) -> None: ... - def after_parent_attach(self, target, parent) -> None: ... - def column_reflect(self, inspector, table, column_info) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/expression.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/expression.pyi deleted file mode 100644 index 44ca4b6ed9df..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/expression.pyi +++ /dev/null @@ -1,203 +0,0 @@ -from _typeshed import Incomplete - -from .base import PARSE_AUTOCOMMIT as PARSE_AUTOCOMMIT, ColumnCollection as ColumnCollection, Executable as Executable -from .dml import Delete as Delete, Insert as Insert, Update as Update, UpdateBase as UpdateBase, ValuesBase as ValuesBase -from .elements import ( - BinaryExpression as BinaryExpression, - BindParameter as BindParameter, - BooleanClauseList as BooleanClauseList, - Case as Case, - Cast as Cast, - ClauseElement as ClauseElement, - ClauseList as ClauseList, - CollectionAggregate as CollectionAggregate, - ColumnClause as ColumnClause, - ColumnElement as ColumnElement, - Extract as Extract, - False_ as False_, - FunctionFilter as FunctionFilter, - Grouping as Grouping, - Label as Label, - Null as Null, - Over as Over, - ReleaseSavepointClause as ReleaseSavepointClause, - RollbackToSavepointClause as RollbackToSavepointClause, - SavepointClause as SavepointClause, - TextClause as TextClause, - True_ as True_, - Tuple as Tuple, - TypeClause as TypeClause, - TypeCoerce as TypeCoerce, - UnaryExpression as UnaryExpression, - WithinGroup as WithinGroup, - _truncated_label as _truncated_label, - between as between, - collate as collate, - literal as literal, - literal_column as literal_column, - not_ as not_, - outparam as outparam, - quoted_name as quoted_name, -) -from .functions import Function as Function, FunctionElement as FunctionElement, func as func, modifier as modifier -from .lambdas import LambdaElement as LambdaElement, StatementLambdaElement as StatementLambdaElement, lambda_stmt as lambda_stmt -from .operators import ColumnOperators as ColumnOperators, Operators as Operators, custom_op as custom_op -from .selectable import ( - CTE as CTE, - LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT, - LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY, - LABEL_STYLE_NONE as LABEL_STYLE_NONE, - LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL, - Alias as Alias, - AliasedReturnsRows as AliasedReturnsRows, - CompoundSelect as CompoundSelect, - Exists as Exists, - FromClause as FromClause, - FromGrouping as FromGrouping, - GenerativeSelect as GenerativeSelect, - HasCTE as HasCTE, - HasPrefixes as HasPrefixes, - HasSuffixes as HasSuffixes, - Join as Join, - Lateral as Lateral, - ReturnsRows as ReturnsRows, - ScalarSelect as ScalarSelect, - Select as Select, - Selectable as Selectable, - SelectBase as SelectBase, - Subquery as Subquery, - TableClause as TableClause, - TableSample as TableSample, - TableValuedAlias as TableValuedAlias, - TextAsFrom as TextAsFrom, - TextualSelect as TextualSelect, - Values as Values, - subquery as subquery, -) -from .traversals import CacheKey as CacheKey -from .visitors import Visitable as Visitable - -__all__ = [ - "Alias", - "AliasedReturnsRows", - "any_", - "all_", - "CacheKey", - "ClauseElement", - "ColumnCollection", - "ColumnElement", - "CompoundSelect", - "Delete", - "FromClause", - "Insert", - "Join", - "Lateral", - "LambdaElement", - "StatementLambdaElement", - "Select", - "Selectable", - "TableClause", - "TableValuedAlias", - "Update", - "Values", - "alias", - "and_", - "asc", - "between", - "bindparam", - "case", - "cast", - "column", - "custom_op", - "cte", - "delete", - "desc", - "distinct", - "except_", - "except_all", - "exists", - "extract", - "func", - "modifier", - "collate", - "insert", - "intersect", - "intersect_all", - "join", - "label", - "lateral", - "lambda_stmt", - "literal", - "literal_column", - "not_", - "null", - "nulls_first", - "nulls_last", - "or_", - "outparam", - "outerjoin", - "over", - "select", - "table", - "text", - "tuple_", - "type_coerce", - "quoted_name", - "union", - "union_all", - "update", - "quoted_name", - "within_group", - "Subquery", - "TableSample", - "tablesample", - "values", -] - -all_: Incomplete -any_: Incomplete -and_: Incomplete -alias: Incomplete -tablesample: Incomplete -lateral: Incomplete -or_: Incomplete -bindparam: Incomplete -select: Incomplete - -def text(text: str, bind: Incomplete | None = None) -> TextClause: ... - -table: Incomplete -column: Incomplete -over: Incomplete -within_group: Incomplete -label: Incomplete -case: Incomplete -cast: Incomplete -cte: Incomplete -values: Incomplete -extract: Incomplete -tuple_: Incomplete -except_: Incomplete -except_all: Incomplete -intersect: Incomplete -intersect_all: Incomplete -union: Incomplete -union_all: Incomplete -exists: Incomplete -nulls_first: Incomplete -nullsfirst: Incomplete -nulls_last: Incomplete -nullslast: Incomplete -asc: Incomplete -desc: Incomplete -distinct: Incomplete -type_coerce: Incomplete -true: Incomplete -false: Incomplete -null: Incomplete -join: Incomplete -outerjoin: Incomplete -insert: Incomplete -update: Incomplete -delete: Incomplete -funcfilter: Incomplete diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi deleted file mode 100644 index 0f5bf12baa0a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi +++ /dev/null @@ -1,228 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..util.langhelpers import HasMemoized -from .base import Executable, Generative -from .elements import BinaryExpression, ColumnElement, NamedColumn -from .selectable import FromClause, TableValuedAlias -from .visitors import TraversibleType - -def register_function(identifier, fn, package: str = "_default") -> None: ... - -class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative): # type: ignore[misc] - packagenames: Incomplete - clause_expr: Incomplete - def __init__(self, *clauses, **kwargs) -> None: ... - def scalar_table_valued(self, name, type_: Incomplete | None = None): ... - def table_valued(self, *expr, **kw): ... - def column_valued(self, name: str | None = None, joins_implicitly: bool = False): ... - @property - def columns(self): ... - @property - def exported_columns(self): ... - @HasMemoized.memoized_attribute - def clauses(self): ... - def over( - self, - partition_by: Incomplete | None = None, - order_by: Incomplete | None = None, - rows: Incomplete | None = None, - range_: Incomplete | None = None, - ): ... - def within_group(self, *order_by): ... - def filter(self, *criterion): ... - def as_comparison(self, left_index, right_index): ... - def within_group_type(self, within_group) -> None: ... - def alias(self, name: str | None = None, joins_implicitly: bool = False) -> TableValuedAlias: ... # type: ignore[override] - def select(self): ... - def scalar(self): ... - def execute(self): ... - def self_group(self, against: Incomplete | None = None): ... - @property - def entity_namespace(self): ... - -class FunctionAsBinary(BinaryExpression): - sql_function: Incomplete - left_index: Incomplete - right_index: Incomplete - operator: Incomplete - type: Incomplete - negate: Incomplete - modifiers: Incomplete - def __init__(self, fn, left_index, right_index) -> None: ... - @property - def left(self): ... - @left.setter - def left(self, value) -> None: ... - @property - def right(self): ... - @right.setter - def right(self, value) -> None: ... - -class ScalarFunctionColumn(NamedColumn): - __visit_name__: str - is_literal: bool - table: Incomplete - fn: Incomplete - name: Incomplete - type: Incomplete - def __init__(self, fn, name, type_: Incomplete | None = None) -> None: ... - -class _FunctionGenerator: - opts: Incomplete - def __init__(self, **opts) -> None: ... - def __getattr__(self, name: str): ... - def __call__(self, *c, **kwargs): ... - -func: Incomplete -modifier: Incomplete - -class Function(FunctionElement): - __visit_name__: str - type: Incomplete - packagenames: Incomplete - name: Incomplete - def __init__(self, name, *clauses, **kw) -> None: ... - -class _GenericMeta(TraversibleType): - def __init__(cls, clsname, bases, clsdict) -> None: ... - -class GenericFunction(Function, metaclass=_GenericMeta): - name: Incomplete - identifier: Incomplete - coerce_arguments: bool - inherit_cache: bool - packagenames: Incomplete - clause_expr: Incomplete - type: Incomplete - def __init__(self, *args, **kwargs) -> None: ... - -class next_value(GenericFunction): - type: Incomplete - name: str - sequence: Incomplete - def __init__(self, seq, **kw) -> None: ... - def compare(self, other, **kw): ... - -class AnsiFunction(GenericFunction): - inherit_cache: bool - def __init__(self, *args, **kwargs) -> None: ... - -class ReturnTypeFromArgs(GenericFunction): - inherit_cache: bool - def __init__(self, *args, **kwargs) -> None: ... - -class coalesce(ReturnTypeFromArgs): - inherit_cache: bool - -class max(ReturnTypeFromArgs): - inherit_cache: bool - -class min(ReturnTypeFromArgs): - inherit_cache: bool - -class sum(ReturnTypeFromArgs): - inherit_cache: bool - -class now(GenericFunction): - type: Incomplete - inherit_cache: bool - -class concat(GenericFunction): - type: Incomplete - inherit_cache: bool - -class char_length(GenericFunction): - type: Incomplete - inherit_cache: bool - def __init__(self, arg, **kwargs) -> None: ... - -class random(GenericFunction): - inherit_cache: bool - -class count(GenericFunction): - type: Incomplete - inherit_cache: bool - def __init__(self, expression: Incomplete | None = None, **kwargs) -> None: ... - -class current_date(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class current_time(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class current_timestamp(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class current_user(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class localtime(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class localtimestamp(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class session_user(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class sysdate(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class user(AnsiFunction): - type: Incomplete - inherit_cache: bool - -class array_agg(GenericFunction): - type: Incomplete - inherit_cache: bool - def __init__(self, *args, **kwargs) -> None: ... - -class OrderedSetAgg(GenericFunction): - array_for_multi_clause: bool - inherit_cache: bool - def within_group_type(self, within_group): ... - -class mode(OrderedSetAgg): - inherit_cache: bool - -class percentile_cont(OrderedSetAgg): - array_for_multi_clause: bool - inherit_cache: bool - -class percentile_disc(OrderedSetAgg): - array_for_multi_clause: bool - inherit_cache: bool - -class rank(GenericFunction): - type: Incomplete - inherit_cache: bool - -class dense_rank(GenericFunction): - type: Incomplete - inherit_cache: bool - -class percent_rank(GenericFunction): - type: Incomplete - inherit_cache: bool - -class cume_dist(GenericFunction): - type: Incomplete - inherit_cache: bool - -class cube(GenericFunction): - inherit_cache: bool - -class rollup(GenericFunction): - inherit_cache: bool - -class grouping_sets(GenericFunction): - inherit_cache: bool diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi deleted file mode 100644 index 49c91eefc3c5..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi +++ /dev/null @@ -1,122 +0,0 @@ -from _typeshed import Incomplete -from typing import Generic, TypeVar - -from . import elements, roles -from .base import Options -from .operators import ColumnOperators - -_T = TypeVar("_T") - -class LambdaOptions(Options): - enable_tracking: bool - track_closure_variables: bool - track_on: Incomplete - global_track_bound_values: bool - track_bound_values: bool - lambda_cache: Incomplete - -def lambda_stmt( - lmb, - enable_tracking: bool = True, - track_closure_variables: bool = True, - track_on: Incomplete | None = None, - global_track_bound_values: bool = True, - track_bound_values: bool = True, - lambda_cache: Incomplete | None = None, -): ... - -class LambdaElement(elements.ClauseElement): - __visit_name__: str - parent_lambda: Incomplete - fn: Incomplete - role: Incomplete - tracker_key: Incomplete - opts: Incomplete - def __init__(self, fn, role, opts=..., apply_propagate_attrs: Incomplete | None = None) -> None: ... - def __getattr__(self, key: str): ... - -class DeferredLambdaElement(LambdaElement): - lambda_args: Incomplete - def __init__(self, fn, role, opts=..., lambda_args=()) -> None: ... - -class StatementLambdaElement(roles.AllowsLambdaRole, LambdaElement): - def __add__(self, other): ... - def add_criteria( - self, - other, - enable_tracking: bool = True, - track_on: Incomplete | None = None, - track_closure_variables: bool = True, - track_bound_values: bool = True, - ): ... - def spoil(self): ... - -class NullLambdaStatement(roles.AllowsLambdaRole, elements.ClauseElement): - __visit_name__: str - def __init__(self, statement) -> None: ... - def __getattr__(self, key: str): ... - def __add__(self, other): ... - def add_criteria(self, other, **kw): ... - -class LinkedLambdaElement(StatementLambdaElement): - role: Incomplete - opts: Incomplete - fn: Incomplete - parent_lambda: Incomplete - tracker_key: Incomplete - def __init__(self, fn, parent_lambda, opts) -> None: ... - -class AnalyzedCode: - @classmethod - def get(cls, fn, lambda_element, lambda_kw, **kw): ... - track_bound_values: Incomplete - track_closure_variables: Incomplete - bindparam_trackers: Incomplete - closure_trackers: Incomplete - build_py_wrappers: Incomplete - def __init__(self, fn, lambda_element, opts) -> None: ... - -class NonAnalyzedFunction: - closure_bindparams: Incomplete - bindparam_trackers: Incomplete - expr: Incomplete - def __init__(self, expr) -> None: ... - @property - def expected_expr(self): ... - -class AnalyzedFunction: - analyzed_code: Incomplete - fn: Incomplete - closure_pywrappers: Incomplete - tracker_instrumented_fn: Incomplete - expr: Incomplete - bindparam_trackers: Incomplete - expected_expr: Incomplete - is_sequence: Incomplete - propagate_attrs: Incomplete - closure_bindparams: Incomplete - def __init__(self, analyzed_code, lambda_element, apply_propagate_attrs, fn) -> None: ... - -class PyWrapper(ColumnOperators[_T], Generic[_T]): - fn: Incomplete - track_bound_values: Incomplete - def __init__( - self, - fn, - name, - to_evaluate, - closure_index: Incomplete | None = None, - getter: Incomplete | None = None, - track_bound_values: bool = True, - ) -> None: ... - def __call__(self, *arg, **kw): ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... - def __clause_element__(self): ... # Field not always present. - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - def __getattribute__(self, key: str): ... - def __iter__(self): ... - def __getitem__(self, key) -> ColumnOperators[_T]: ... - -def insp(lmb): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/naming.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/naming.pyi deleted file mode 100644 index 50bdacf72a28..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/naming.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from typing import Any - -from .elements import conv as conv - -class ConventionDict: - const: Any - table: Any - convention: Any - def __init__(self, const, table, convention) -> None: ... - def __getitem__(self, key): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi deleted file mode 100644 index cb91ff53553d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi +++ /dev/null @@ -1,194 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Container, Iterable -from operator import truediv -from typing import Any, Generic, TypeVar - -_T = TypeVar("_T") - -div = truediv - -class Operators: - def __and__(self, other): ... - def __or__(self, other): ... - def __invert__(self): ... - def op(self, opstring, precedence: int = 0, is_comparison: bool = False, return_type: Incomplete | None = None): ... - def bool_op(self, opstring, precedence: int = 0): ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... - -class custom_op: - __name__: str - opstring: Any - precedence: Any - is_comparison: Any - natural_self_precedent: Any - eager_grouping: Any - return_type: Any - def __init__( - self, - opstring, - precedence: int = 0, - is_comparison: bool = False, - return_type: Incomplete | None = None, - natural_self_precedent: bool = False, - eager_grouping: bool = False, - ) -> None: ... - def __eq__(self, other): ... - def __hash__(self) -> int: ... - def __call__(self, left, right, **kw): ... - -class ColumnOperators(Operators, Generic[_T]): - timetuple: Any - def __lt__(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... - def __le__(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... - def __hash__(self) -> int: ... - def __eq__(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... # type: ignore[override] - def __ne__(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... # type: ignore[override] - def is_distinct_from(self, other) -> ColumnOperators[_T]: ... - def is_not_distinct_from(self, other) -> ColumnOperators[_T]: ... - def isnot_distinct_from(self, other) -> ColumnOperators[_T]: ... - def __gt__(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... - def __ge__(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... - def __neg__(self) -> ColumnOperators[_T]: ... - def __contains__(self, other) -> ColumnOperators[_T]: ... - def __getitem__(self, index: int) -> ColumnOperators[_T]: ... - def __lshift__(self, other) -> ColumnOperators[_T]: ... - def __rshift__(self, other) -> ColumnOperators[_T]: ... - def concat(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... - def like(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... - def ilike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... - def in_(self, other: Container[_T] | Iterable[_T]) -> ColumnOperators[_T]: ... - def not_in(self, other: Container[_T] | Iterable[_T]) -> ColumnOperators[_T]: ... - def notin_(self, other: Container[_T] | Iterable[_T]) -> ColumnOperators[_T]: ... - def not_like(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... - def notlike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... - def not_ilike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... - def notilike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... - def is_(self, other: _T) -> ColumnOperators[_T]: ... - def is_not(self, other: _T) -> ColumnOperators[_T]: ... - def isnot(self, other: _T) -> ColumnOperators[_T]: ... - def startswith(self, other: str, **kwargs) -> ColumnOperators[_T]: ... - def endswith(self, other: str, **kwargs) -> ColumnOperators[_T]: ... - def contains(self, other: str, **kwargs) -> ColumnOperators[_T]: ... - def match(self, other: str, **kwargs) -> ColumnOperators[_T]: ... - def regexp_match(self, pattern, flags: Incomplete | None = None) -> ColumnOperators[_T]: ... - def regexp_replace(self, pattern, replacement, flags: Incomplete | None = None) -> ColumnOperators[_T]: ... - def desc(self) -> ColumnOperators[_T]: ... - def asc(self) -> ColumnOperators[_T]: ... - def nulls_first(self) -> ColumnOperators[_T]: ... - def nullsfirst(self) -> ColumnOperators[_T]: ... - def nulls_last(self) -> ColumnOperators[_T]: ... - def nullslast(self) -> ColumnOperators[_T]: ... - def collate(self, collation) -> ColumnOperators[_T]: ... - def __radd__(self, other) -> ColumnOperators[_T]: ... - def __rsub__(self, other) -> ColumnOperators[_T]: ... - def __rmul__(self, other) -> ColumnOperators[_T]: ... - def __rdiv__(self, other) -> ColumnOperators[_T]: ... - def __rmod__(self, other) -> ColumnOperators[_T]: ... - def between(self, cleft, cright, symmetric: bool = False) -> ColumnOperators[_T]: ... - def distinct(self) -> ColumnOperators[_T]: ... - def any_(self) -> ColumnOperators[_T]: ... - def all_(self) -> ColumnOperators[_T]: ... - def __add__(self, other) -> ColumnOperators[_T]: ... - def __sub__(self, other) -> ColumnOperators[_T]: ... - def __mul__(self, other) -> ColumnOperators[_T]: ... - def __div__(self, other) -> ColumnOperators[_T]: ... - def __mod__(self, other) -> ColumnOperators[_T]: ... - def __truediv__(self, other) -> ColumnOperators[_T]: ... - def __rtruediv__(self, other) -> ColumnOperators[_T]: ... - -def commutative_op(fn): ... -def comparison_op(fn): ... -def from_() -> None: ... -def function_as_comparison_op() -> None: ... -def as_() -> None: ... -def exists() -> None: ... -def is_true(a) -> None: ... - -istrue = is_true - -def is_false(a) -> None: ... - -isfalse = is_false - -def is_distinct_from(a, b): ... -def is_not_distinct_from(a, b): ... - -isnot_distinct_from = is_not_distinct_from - -def is_(a, b): ... -def is_not(a, b): ... - -isnot = is_not - -def collate(a, b): ... -def op(a, opstring, b): ... -def like_op(a, b, escape: Incomplete | None = None): ... -def not_like_op(a, b, escape: Incomplete | None = None): ... - -notlike_op = not_like_op - -def ilike_op(a, b, escape: Incomplete | None = None): ... -def not_ilike_op(a, b, escape: Incomplete | None = None): ... - -notilike_op = not_ilike_op - -def between_op(a, b, c, symmetric: bool = False): ... -def not_between_op(a, b, c, symmetric: bool = False): ... - -notbetween_op = not_between_op - -def in_op(a, b): ... -def not_in_op(a, b): ... - -notin_op = not_in_op - -def distinct_op(a): ... -def any_op(a): ... -def all_op(a): ... -def startswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... -def not_startswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... - -notstartswith_op = not_startswith_op - -def endswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... -def not_endswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... - -notendswith_op = not_endswith_op - -def contains_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... -def not_contains_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... - -notcontains_op = not_contains_op - -def match_op(a, b, **kw): ... -def regexp_match_op(a, b, flags: Incomplete | None = None): ... -def not_regexp_match_op(a, b, flags: Incomplete | None = None): ... -def regexp_replace_op(a, b, replacement, flags: Incomplete | None = None): ... -def not_match_op(a, b, **kw): ... - -notmatch_op = not_match_op - -def comma_op(a, b) -> None: ... -def filter_op(a, b) -> None: ... -def concat_op(a, b): ... -def desc_op(a): ... -def asc_op(a): ... -def nulls_first_op(a): ... - -nullsfirst_op = nulls_first_op - -def nulls_last_op(a): ... - -nullslast_op = nulls_last_op - -def json_getitem_op(a, b) -> None: ... -def json_path_getitem_op(a, b) -> None: ... -def is_comparison(op) -> bool: ... -def is_commutative(op) -> bool: ... -def is_ordering_modifier(op) -> bool: ... -def is_natural_self_precedent(op) -> bool: ... -def is_boolean(op) -> bool: ... -def mirror(op): ... -def is_associative(op) -> bool: ... -def is_precedent(operator, against) -> bool: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/roles.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/roles.pyi deleted file mode 100644 index e7c290b149c3..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/roles.pyi +++ /dev/null @@ -1,57 +0,0 @@ -class SQLRole: - allows_lambda: bool - uses_inspection: bool - -class UsesInspection: - uses_inspection: bool - -class AllowsLambdaRole: - allows_lambda: bool - -class HasCacheKeyRole(SQLRole): ... -class ExecutableOptionRole(SQLRole): ... -class LiteralValueRole(SQLRole): ... -class ColumnArgumentRole(SQLRole): ... -class ColumnArgumentOrKeyRole(ColumnArgumentRole): ... -class StrAsPlainColumnRole(ColumnArgumentRole): ... -class ColumnListRole(SQLRole): ... -class TruncatedLabelRole(SQLRole): ... -class ColumnsClauseRole(AllowsLambdaRole, UsesInspection, ColumnListRole): ... -class LimitOffsetRole(SQLRole): ... -class ByOfRole(ColumnListRole): ... -class GroupByRole(AllowsLambdaRole, UsesInspection, ByOfRole): ... -class OrderByRole(AllowsLambdaRole, ByOfRole): ... -class StructuralRole(SQLRole): ... -class StatementOptionRole(StructuralRole): ... -class OnClauseRole(AllowsLambdaRole, StructuralRole): ... -class WhereHavingRole(OnClauseRole): ... -class ExpressionElementRole(SQLRole): ... -class ConstExprRole(ExpressionElementRole): ... -class LabeledColumnExprRole(ExpressionElementRole): ... -class BinaryElementRole(ExpressionElementRole): ... -class InElementRole(SQLRole): ... -class JoinTargetRole(AllowsLambdaRole, UsesInspection, StructuralRole): ... -class FromClauseRole(ColumnsClauseRole, JoinTargetRole): ... - -class StrictFromClauseRole(FromClauseRole): - @property - def description(self) -> None: ... - -class AnonymizedFromClauseRole(StrictFromClauseRole): ... -class ReturnsRowsRole(SQLRole): ... -class StatementRole(SQLRole): ... - -class SelectStatementRole(StatementRole, ReturnsRowsRole): - def subquery(self) -> None: ... - -class HasCTERole(ReturnsRowsRole): ... -class IsCTERole(SQLRole): ... -class CompoundElementRole(AllowsLambdaRole, SQLRole): ... -class DMLRole(StatementRole): ... -class DMLTableRole(FromClauseRole): ... -class DMLColumnRole(SQLRole): ... -class DMLSelectRole(SQLRole): ... -class DDLRole(StatementRole): ... -class DDLExpressionRole(StructuralRole): ... -class DDLConstraintColumnRole(SQLRole): ... -class DDLReferredColumnRole(DDLConstraintColumnRole): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi deleted file mode 100644 index 2b5dac32c7fa..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi +++ /dev/null @@ -1,378 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from ..util.langhelpers import memoized_property -from . import visitors -from .base import DialectKWArgs, Executable, SchemaEventTarget -from .elements import ColumnClause -from .selectable import TableClause - -RETAIN_SCHEMA: Any -BLANK_SCHEMA: Any -NULL_UNSPECIFIED: Any - -class SchemaItem(SchemaEventTarget, visitors.Visitable): - __visit_name__: str - create_drop_stringify_dialect: str - @property # Should be @memoized_property, but that causes issues with regr_test - def info(self): ... - -class Table(DialectKWArgs, SchemaItem, TableClause): - __visit_name__: str - constraints: Any - indexes: Any - def __new__(cls, *args, **kw): ... - def __init__(self, *args, **kw) -> None: ... - @property - def foreign_key_constraints(self): ... - @property - def key(self): ... - @property - def bind(self): ... - def add_is_dependent_on(self, table) -> None: ... - def append_column(self, column, replace_existing: bool = False) -> None: ... # type: ignore[override] - def append_constraint(self, constraint) -> None: ... - def exists(self, bind: Incomplete | None = None): ... - def create(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... - def drop(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... - def tometadata(self, metadata, schema=..., referred_schema_fn: Incomplete | None = None, name: Incomplete | None = None): ... - def to_metadata(self, metadata, schema=..., referred_schema_fn: Incomplete | None = None, name: Incomplete | None = None): ... - -class Column(DialectKWArgs, SchemaItem, ColumnClause): - __visit_name__: str - inherit_cache: bool - key: Any - primary_key: Any - nullable: Any - default: Any - server_default: Any - server_onupdate: Any - index: Any - unique: Any - system: Any - doc: Any - onupdate: Any - autoincrement: Any - constraints: Any - foreign_keys: Any - comment: Any - computed: Any - identity: Any - info: Any - def __init__(self, *args, **kwargs) -> None: ... - def references(self, column): ... - def append_foreign_key(self, fk) -> None: ... - def copy(self, **kw): ... - -class ForeignKey(DialectKWArgs, SchemaItem): - __visit_name__: str - constraint: Any - parent: Any - use_alter: Any - name: Any - onupdate: Any - ondelete: Any - deferrable: Any - initially: Any - link_to_name: Any - match: Any - info: Any - def __init__( - self, - column, - _constraint: Incomplete | None = None, - use_alter: bool = False, - name: Incomplete | None = None, - onupdate: Incomplete | None = None, - ondelete: Incomplete | None = None, - deferrable: Incomplete | None = None, - initially: Incomplete | None = None, - link_to_name: bool = False, - match: Incomplete | None = None, - info: Incomplete | None = None, - _unresolvable: bool = False, - **dialect_kw, - ) -> None: ... - def copy(self, schema: Incomplete | None = None, **kw): ... - @property - def target_fullname(self): ... - def references(self, table): ... - def get_referent(self, table): ... - @memoized_property - def column(self): ... - -class DefaultGenerator(Executable, SchemaItem): - __visit_name__: str - is_sequence: bool - is_server_default: bool - column: Any - for_update: Any - def __init__(self, for_update: bool = False) -> None: ... - def execute(self, bind: Incomplete | None = None): ... # type: ignore[override] - @property - def bind(self): ... - -class ColumnDefault(DefaultGenerator): - arg: Any - def __init__(self, arg, **kwargs) -> None: ... - @memoized_property - def is_callable(self): ... - @memoized_property - def is_clause_element(self): ... - @memoized_property - def is_scalar(self): ... - -class IdentityOptions: - start: Any - increment: Any - minvalue: Any - maxvalue: Any - nominvalue: Any - nomaxvalue: Any - cycle: Any - cache: Any - order: Any - def __init__( - self, - start: Incomplete | None = None, - increment: Incomplete | None = None, - minvalue: Incomplete | None = None, - maxvalue: Incomplete | None = None, - nominvalue: Incomplete | None = None, - nomaxvalue: Incomplete | None = None, - cycle: Incomplete | None = None, - cache: Incomplete | None = None, - order: Incomplete | None = None, - ) -> None: ... - -class Sequence(IdentityOptions, DefaultGenerator): - __visit_name__: str - is_sequence: bool - name: Any - optional: Any - schema: Any - metadata: Any - data_type: Any - def __init__( - self, - name, - start: Incomplete | None = None, - increment: Incomplete | None = None, - minvalue: Incomplete | None = None, - maxvalue: Incomplete | None = None, - nominvalue: Incomplete | None = None, - nomaxvalue: Incomplete | None = None, - cycle: Incomplete | None = None, - schema: Incomplete | None = None, - cache: Incomplete | None = None, - order: Incomplete | None = None, - data_type: Incomplete | None = None, - optional: bool = False, - quote: Incomplete | None = None, - metadata: Incomplete | None = None, - quote_schema: Incomplete | None = None, - for_update: bool = False, - ) -> None: ... - @memoized_property - def is_callable(self): ... - @memoized_property - def is_clause_element(self): ... - def next_value(self): ... - @property - def bind(self): ... - def create(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... - def drop(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... - -class FetchedValue(SchemaEventTarget): - is_server_default: bool - reflected: bool - has_argument: bool - is_clause_element: bool - for_update: Any - def __init__(self, for_update: bool = False) -> None: ... - -class DefaultClause(FetchedValue): - has_argument: bool - arg: Any - reflected: Any - def __init__(self, arg, for_update: bool = False, _reflected: bool = False) -> None: ... - -class Constraint(DialectKWArgs, SchemaItem): - __visit_name__: str - name: Any - deferrable: Any - initially: Any - info: Any - def __init__( - self, - name: Incomplete | None = None, - deferrable: Incomplete | None = None, - initially: Incomplete | None = None, - _create_rule: Incomplete | None = None, - info: Incomplete | None = None, - _type_bound: bool = False, - **dialect_kw, - ) -> None: ... - @property - def table(self): ... - def copy(self, **kw): ... - -class ColumnCollectionMixin: - columns: Any - def __init__(self, *columns, **kw) -> None: ... - -class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): - def __init__(self, *columns, **kw) -> None: ... - columns: Any - def __contains__(self, x): ... - def copy(self, target_table: Incomplete | None = None, **kw): ... - def contains_column(self, col): ... - def __iter__(self): ... - def __len__(self) -> int: ... - -class CheckConstraint(ColumnCollectionConstraint): - __visit_name__: str - sqltext: Any - def __init__( - self, - sqltext, - name: Incomplete | None = None, - deferrable: Incomplete | None = None, - initially: Incomplete | None = None, - table: Incomplete | None = None, - info: Incomplete | None = None, - _create_rule: Incomplete | None = None, - _autoattach: bool = True, - _type_bound: bool = False, - **kw, - ) -> None: ... - @property - def is_column_level(self): ... - def copy(self, target_table: Incomplete | None = None, **kw): ... - -class ForeignKeyConstraint(ColumnCollectionConstraint): - __visit_name__: str - onupdate: Any - ondelete: Any - link_to_name: Any - use_alter: Any - match: Any - elements: Any - def __init__( - self, - columns, - refcolumns, - name: Incomplete | None = None, - onupdate: Incomplete | None = None, - ondelete: Incomplete | None = None, - deferrable: Incomplete | None = None, - initially: Incomplete | None = None, - use_alter: bool = False, - link_to_name: bool = False, - match: Incomplete | None = None, - table: Incomplete | None = None, - info: Incomplete | None = None, - **dialect_kw, - ) -> None: ... - columns: Any - @property - def referred_table(self): ... - @property - def column_keys(self): ... - def copy(self, schema: Incomplete | None = None, target_table: Incomplete | None = None, **kw): ... # type: ignore[override] - -class PrimaryKeyConstraint(ColumnCollectionConstraint): - __visit_name__: str - def __init__(self, *columns, **kw) -> None: ... - @property - def columns_autoinc_first(self): ... - -class UniqueConstraint(ColumnCollectionConstraint): - __visit_name__: str - -class Index(DialectKWArgs, ColumnCollectionMixin, SchemaItem): - __visit_name__: str - table: Any - name: Any - unique: Any - info: Any - expressions: Any - def __init__(self, name, *expressions, **kw) -> None: ... - @property - def bind(self): ... - def create(self, bind: Incomplete | None = None, checkfirst: bool = False): ... - def drop(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... - -DEFAULT_NAMING_CONVENTION: Any - -class MetaData(SchemaItem): - __visit_name__: str - tables: Any - schema: Any - naming_convention: Any - info: Any - def __init__( - self, - bind: Incomplete | None = None, - schema: Incomplete | None = None, - quote_schema: Incomplete | None = None, - naming_convention: Incomplete | None = None, - info: Incomplete | None = None, - ) -> None: ... - def __contains__(self, table_or_key) -> bool: ... - def is_bound(self): ... - bind: Any - def clear(self) -> None: ... - def remove(self, table) -> None: ... - @property - def sorted_tables(self): ... - def reflect( - self, - bind: Incomplete | None = None, - schema: Incomplete | None = None, - views: bool = False, - only: Incomplete | None = None, - extend_existing: bool = False, - autoload_replace: bool = True, - resolve_fks: bool = True, - **dialect_kwargs, - ) -> None: ... - def create_all(self, bind: Incomplete | None = None, tables: Incomplete | None = None, checkfirst: bool = True) -> None: ... - def drop_all(self, bind: Incomplete | None = None, tables: Incomplete | None = None, checkfirst: bool = True) -> None: ... - -class ThreadLocalMetaData(MetaData): - __visit_name__: str - context: Any - def __init__(self) -> None: ... - bind: Any - def is_bound(self): ... - def dispose(self) -> None: ... - -class Computed(FetchedValue, SchemaItem): - __visit_name__: str - sqltext: Any - persisted: Any - column: Any - def __init__(self, sqltext, persisted: Incomplete | None = None) -> None: ... - def copy(self, target_table: Incomplete | None = None, **kw): ... - -class Identity(IdentityOptions, FetchedValue, SchemaItem): - __visit_name__: str - always: Any - on_null: Any - column: Any - def __init__( - self, - always: bool = False, - on_null: Incomplete | None = None, - start: Incomplete | None = None, - increment: Incomplete | None = None, - minvalue: Incomplete | None = None, - maxvalue: Incomplete | None = None, - nominvalue: Incomplete | None = None, - nomaxvalue: Incomplete | None = None, - cycle: Incomplete | None = None, - cache: Incomplete | None = None, - order: Incomplete | None = None, - ) -> None: ... - def copy(self, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi deleted file mode 100644 index fff056a8488d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi +++ /dev/null @@ -1,438 +0,0 @@ -from _typeshed import Incomplete -from typing import Any -from typing_extensions import Self - -from .. import util -from ..util.langhelpers import HasMemoized, memoized_property -from . import roles, traversals, visitors -from .annotation import Annotated, SupportsCloneAnnotations -from .base import CacheableOptions, CompileState, Executable, Generative, HasCompileState, Immutable -from .elements import ( - BindParameter as BindParameter, - BooleanClauseList as BooleanClauseList, - ClauseElement as ClauseElement, - ClauseList as ClauseList, - ColumnClause as ColumnClause, - GroupedElement as GroupedElement, - Grouping as Grouping, - TableValuedColumn as TableValuedColumn, - UnaryExpression as UnaryExpression, - literal_column as literal_column, -) - -class _OffsetLimitParam(BindParameter[Any]): - inherit_cache: bool - -def subquery(alias, *args, **kwargs): ... - -class ReturnsRows(roles.ReturnsRowsRole, ClauseElement): - @property - def selectable(self): ... - @property - def exported_columns(self) -> None: ... - -class Selectable(ReturnsRows): - __visit_name__: str - is_selectable: bool - def lateral(self, name: Incomplete | None = None): ... - def replace_selectable(self, old, alias): ... - def corresponding_column(self, column, require_embedded: bool = False): ... - -class HasPrefixes: - def prefix_with(self, *expr, **kw) -> Self: ... - -class HasSuffixes: - def suffix_with(self, *expr, **kw) -> Self: ... - -class HasHints: - def with_statement_hint(self, text, dialect_name: str = "*"): ... - def with_hint(self, selectable, text: str, dialect_name: str = "*") -> Self: ... - -class FromClause(roles.AnonymizedFromClauseRole, Selectable): - __visit_name__: str - named_with_column: bool - schema: Any - is_selectable: bool - def select(self, whereclause: Incomplete | None = None, **kwargs): ... - def join(self, right, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False): ... - def outerjoin(self, right, onclause: Incomplete | None = None, full: bool = False): ... - def alias(self, name: Incomplete | None = None, flat: bool = False): ... - def table_valued(self): ... - def tablesample(self, sampling, name: Incomplete | None = None, seed: Incomplete | None = None): ... - def is_derived_from(self, fromclause): ... - @property - def description(self): ... - @property - def exported_columns(self): ... - @memoized_property - def columns(self): ... - @property - def entity_namespace(self): ... - @memoized_property - def primary_key(self): ... - @memoized_property - def foreign_keys(self): ... - @property - def c(self): ... - -LABEL_STYLE_NONE: Any -LABEL_STYLE_TABLENAME_PLUS_COL: Any -LABEL_STYLE_DISAMBIGUATE_ONLY: Any -LABEL_STYLE_DEFAULT: Any - -class Join(roles.DMLTableRole, FromClause): - __visit_name__: str - left: Any - right: Any - onclause: Any - isouter: Any - full: Any - def __init__(self, left, right, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False) -> None: ... - @property - def description(self): ... - def is_derived_from(self, fromclause): ... - def self_group(self, against: Incomplete | None = None): ... - def select(self, whereclause: Incomplete | None = None, **kwargs): ... - @property - def bind(self): ... - def alias(self, name: Incomplete | None = None, flat: bool = False): ... - -class NoInit: - def __init__(self, *arg, **kw) -> None: ... - -class AliasedReturnsRows(NoInit, FromClause): - named_with_column: bool - @property - def description(self): ... - @property - def original(self): ... - def is_derived_from(self, fromclause): ... - @property - def bind(self): ... - -class Alias(roles.DMLTableRole, AliasedReturnsRows): - __visit_name__: str - inherit_cache: bool - -class TableValuedAlias(Alias): - __visit_name__: str - joins_implicitly: bool - def _init( - self, - selectable, - name: Incomplete | None = None, - table_value_type: Incomplete | None = None, - joins_implicitly: bool = False, - ) -> None: ... - @HasMemoized.memoized_attribute - def column(self): ... - def alias(self, name: Incomplete | None = None): ... # type: ignore[override] - def lateral(self, name: Incomplete | None = None): ... - def render_derived(self, name: Incomplete | None = None, with_types: bool = False): ... - -class Lateral(AliasedReturnsRows): - __visit_name__: str - inherit_cache: bool - -class TableSample(AliasedReturnsRows): - __visit_name__: str - -class CTE(roles.DMLTableRole, roles.IsCTERole, Generative, HasPrefixes, HasSuffixes, AliasedReturnsRows): - __visit_name__: str - def alias(self, name: Incomplete | None = None, flat: bool = False): ... - def union(self, *other): ... - def union_all(self, *other): ... - -class HasCTE(roles.HasCTERole): - def add_cte(self, cte) -> None: ... - def cte(self, name: Incomplete | None = None, recursive: bool = False, nesting: bool = False): ... - -class Subquery(AliasedReturnsRows): - __visit_name__: str - inherit_cache: bool - def as_scalar(self): ... - -class FromGrouping(GroupedElement, FromClause): - element: 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): ... - -class TableClause(roles.DMLTableRole, Immutable, FromClause): - __visit_name__: str - named_with_column: bool - implicit_returning: bool - name: Any - primary_key: Any - foreign_keys: Any - schema: Any - fullname: Any - def __init__(self, name, *columns, **kw) -> None: ... - @memoized_property - def description(self): ... - def append_column(self, c, **kw) -> None: ... - def insert(self, values: Incomplete | None = None, inline: bool = False, **kwargs): ... - def update(self, whereclause: Incomplete | None = None, values: Incomplete | None = None, inline: bool = False, **kwargs): ... - def delete(self, whereclause: Incomplete | None = None, **kwargs): ... - -class ForUpdateArg(ClauseElement): - def __eq__(self, other): ... - def __ne__(self, other): ... - def __hash__(self) -> int: ... - nowait: Any - read: Any - skip_locked: Any - key_share: Any - of: Any - def __init__( - self, - nowait: bool = False, - read: bool = False, - of: Incomplete | None = None, - skip_locked: bool = False, - key_share: bool = False, - ) -> None: ... - -class Values(Generative, FromClause): - named_with_column: bool - __visit_name__: str - name: Any - literal_binds: Any - def __init__(self, *columns, **kw) -> None: ... - def alias(self, name: Incomplete | None, **kw) -> Self: ... # type: ignore[override] - def lateral(self, name: Incomplete | None = None) -> Self: ... - def data(self, values) -> Self: ... - -class SelectBase( - roles.SelectStatementRole, - roles.DMLSelectRole, - roles.CompoundElementRole, - roles.InElementRole, - HasCTE, - Executable, - SupportsCloneAnnotations, - Selectable, -): - is_select: bool - @property - def selected_columns(self) -> None: ... - @property - def exported_columns(self): ... - @property - def c(self): ... - @property - def columns(self): ... - def select(self, *arg, **kw): ... - def as_scalar(self): ... - def exists(self): ... - def scalar_subquery(self): ... - def label(self, name): ... - def lateral(self, name: Incomplete | None = None): ... - def subquery(self, name: Incomplete | None = None): ... - def alias(self, name: Incomplete | None = None, flat: bool = False): ... - -class SelectStatementGrouping(GroupedElement, SelectBase): - __visit_name__: str - element: Any - def __init__(self, element) -> None: ... - def get_label_style(self): ... - def set_label_style(self, label_style): ... - @property - def select_statement(self): ... - def self_group(self, against: Incomplete | None = None): ... - @property - def selected_columns(self): ... - -class DeprecatedSelectBaseGenerations: - def append_order_by(self, *clauses) -> None: ... - def append_group_by(self, *clauses) -> None: ... - -class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase): - def __init__( - self, - _label_style=..., - use_labels: bool = False, - limit: Incomplete | None = None, - offset: Incomplete | None = None, - order_by: Incomplete | None = None, - group_by: Incomplete | None = None, - bind: Incomplete | None = None, - ) -> None: ... - def with_for_update( - self, - nowait: bool = False, - read: bool = False, - of: Incomplete | None = None, - skip_locked: bool = False, - key_share: bool = False, - ) -> Self: ... - def get_label_style(self): ... - def set_label_style(self, style): ... - def apply_labels(self): ... - def limit(self, limit: Incomplete | None) -> Self: ... - def fetch(self, count: Incomplete | None, with_ties: bool = False, percent: bool = False) -> Self: ... - def offset(self, offset: Incomplete | None) -> Self: ... - def slice(self, start: Incomplete | None, stop: Incomplete | None) -> Self: ... - def order_by(self, *clauses) -> Self: ... - def group_by(self, *clauses) -> Self: ... - -class CompoundSelectState(CompileState): ... - -class CompoundSelect(HasCompileState, GenerativeSelect): - __visit_name__: str - UNION: Any - UNION_ALL: Any - EXCEPT: Any - EXCEPT_ALL: Any - INTERSECT: Any - INTERSECT_ALL: Any - keyword: Any - selects: Any - def __init__(self, keyword, *selects, **kwargs) -> None: ... - def self_group(self, against: Incomplete | None = None): ... - def is_derived_from(self, fromclause): ... - @property - def selected_columns(self): ... - @property - def bind(self): ... - @bind.setter - def bind(self, bind) -> None: ... - -class DeprecatedSelectGenerations: - def append_correlation(self, fromclause) -> None: ... - def append_column(self, column) -> None: ... - def append_prefix(self, clause) -> None: ... - def append_whereclause(self, whereclause) -> None: ... - def append_having(self, having) -> None: ... - def append_from(self, fromclause) -> None: ... - -class SelectState(util.MemoizedSlots, CompileState): - class default_select_compile_options(CacheableOptions): ... - statement: Any - from_clauses: Any - froms: Any - columns_plus_names: Any - def __init__(self, statement, compiler, **kw) -> None: ... - @classmethod - def get_column_descriptions(cls, statement) -> None: ... - @classmethod - def from_statement(cls, statement, from_statement) -> None: ... - @classmethod - def get_columns_clause_froms(cls, statement): ... - @classmethod - def determine_last_joined_entity(cls, stmt): ... - @classmethod - def all_selected_columns(cls, statement): ... - -class _SelectFromElements: ... - -class _MemoizedSelectEntities(traversals.HasCacheKey, traversals.HasCopyInternals, visitors.Traversible): - __visit_name__: str - -class Select( - HasPrefixes, HasSuffixes, HasHints, HasCompileState, DeprecatedSelectGenerations, _SelectFromElements, GenerativeSelect -): - __visit_name__: str - @classmethod - def create_legacy_select( - cls, - columns: Incomplete | None = None, - whereclause: Incomplete | None = None, - from_obj: Incomplete | None = None, - distinct: bool = False, - having: Incomplete | None = None, - correlate: bool = True, - prefixes: Incomplete | None = None, - suffixes: Incomplete | None = None, - **kwargs, - ): ... - def __init__(self) -> None: ... - def filter(self, *criteria): ... - def filter_by(self, **kwargs): ... - @property - def column_descriptions(self): ... - def from_statement(self, statement): ... - def join(self, target, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False) -> Self: ... - def outerjoin_from(self, from_, target, onclause: Incomplete | None = None, full: bool = False): ... - def join_from(self, from_, target, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False) -> Self: ... - def outerjoin(self, target, onclause: Incomplete | None = None, full: bool = False): ... - def get_final_froms(self): ... - @property - def froms(self): ... - @property - def columns_clause_froms(self): ... - @property - def inner_columns(self): ... - def is_derived_from(self, fromclause): ... - def get_children(self, **kwargs): ... - def add_columns(self, *columns) -> Self: ... - def column(self, column): ... - def reduce_columns(self, only_synonyms: bool = True): ... - def with_only_columns(self, *columns, **kw) -> Self: ... - @property - def whereclause(self): ... - def where(self, *whereclause) -> Self: ... - def having(self, having) -> Self: ... - def distinct(self, *expr) -> Self: ... - def select_from(self, *froms) -> Self: ... - def correlate(self, *fromclauses) -> Self: ... - def correlate_except(self, *fromclauses) -> Self: ... - @HasMemoized.memoized_attribute - def selected_columns(self): ... - def self_group(self, against: Incomplete | None = None): ... - 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): ... - @property - def bind(self): ... - @bind.setter - def bind(self, bind) -> None: ... - -class ScalarSelect(roles.InElementRole, Generative, Grouping): - inherit_cache: bool - element: Any - type: Any - def __init__(self, element) -> None: ... - @property - def columns(self) -> None: ... - @property - def c(self): ... - def where(self, crit) -> Self: ... - def self_group(self, **kwargs): ... - def correlate(self, *fromclauses) -> Self: ... - def correlate_except(self, *fromclauses) -> Self: ... - -class Exists(UnaryExpression): - inherit_cache: bool - def __init__(self, *args, **kwargs) -> None: ... - def select(self, whereclause: Incomplete | None = None, **kwargs): ... - def correlate(self, *fromclause): ... - def correlate_except(self, *fromclause): ... - def select_from(self, *froms): ... - def where(self, *clause): ... - -class TextualSelect(SelectBase): - __visit_name__: str - is_text: bool - is_select: bool - element: Any - column_args: Any - positional: Any - def __init__(self, text, columns, positional: bool = False) -> None: ... - @HasMemoized.memoized_attribute - def selected_columns(self): ... - def bindparams(self, *binds, **bind_as_values) -> Self: ... - -TextAsFrom = TextualSelect - -class AnnotatedFromClause(Annotated): - def __init__(self, element, values) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi deleted file mode 100644 index 2538111c3620..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi +++ /dev/null @@ -1,381 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, TypeVar - -from .base import SchemaEventTarget -from .operators import ColumnOperators -from .traversals import HasCacheKey -from .type_api import ( - Emulated as Emulated, - NativeForEmulated as NativeForEmulated, - TypeDecorator as TypeDecorator, - TypeEngine as TypeEngine, - Variant as Variant, - to_instance as to_instance, -) - -_T = TypeVar("_T") - -class _LookupExpressionAdapter: - class Comparator(TypeEngine.Comparator[Any]): ... - comparator_factory: Any - -class Concatenable: - class Comparator(TypeEngine.Comparator[_T], Generic[_T]): ... - comparator_factory: Any - -class Indexable: - class Comparator(TypeEngine.Comparator[_T], Generic[_T]): - def __getitem__(self, index) -> ColumnOperators[_T]: ... - comparator_factory: Any - -class String(Concatenable, TypeEngine): - __visit_name__: str - RETURNS_UNICODE: Any - RETURNS_BYTES: Any - RETURNS_CONDITIONAL: Any - RETURNS_UNKNOWN: Any - length: Any - collation: Any - def __init__( - self, - length: Incomplete | None = None, - collation: Incomplete | None = None, - convert_unicode: bool = False, - unicode_error: Incomplete | None = None, - _warn_on_bytestring: bool = False, - _expect_unicode: bool = False, - ) -> 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__: str - -class Unicode(String): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class UnicodeText(Text): - __visit_name__: str - def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... - -class Integer(_LookupExpressionAdapter, TypeEngine): - __visit_name__: str - def get_dbapi_type(self, dbapi): ... - @property - def python_type(self): ... - def literal_processor(self, dialect): ... - -class SmallInteger(Integer): - __visit_name__: str - -class BigInteger(Integer): - __visit_name__: str - -class Numeric(_LookupExpressionAdapter, TypeEngine): - __visit_name__: str - precision: Any - scale: Any - decimal_return_scale: Any - asdecimal: Any - def __init__( - self, - precision: Incomplete | None = None, - scale: Incomplete | None = None, - decimal_return_scale: Incomplete | None = None, - asdecimal: bool = True, - ) -> 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__: str - scale: Any - precision: Any - asdecimal: Any - decimal_return_scale: Any - def __init__( - self, precision: Incomplete | None = None, asdecimal: bool = False, decimal_return_scale: Incomplete | None = None - ) -> None: ... - def result_processor(self, dialect, coltype): ... - -class DateTime(_LookupExpressionAdapter, TypeEngine): - __visit_name__: str - timezone: Any - def __init__(self, timezone: bool = False) -> None: ... - def get_dbapi_type(self, dbapi): ... - @property - def python_type(self): ... - -class Date(_LookupExpressionAdapter, TypeEngine): - __visit_name__: str - def get_dbapi_type(self, dbapi): ... - @property - def python_type(self): ... - -class Time(_LookupExpressionAdapter, TypeEngine): - __visit_name__: str - timezone: Any - def __init__(self, timezone: bool = False) -> None: ... - def get_dbapi_type(self, dbapi): ... - @property - def python_type(self): ... - -class _Binary(TypeEngine): - length: Any - def __init__(self, length: Incomplete | None = None) -> None: ... - def literal_processor(self, dialect): ... - @property - def python_type(self): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - def coerce_compared_value(self, op, value): ... - def get_dbapi_type(self, dbapi): ... - -class LargeBinary(_Binary): - __visit_name__: str - def __init__(self, length: Incomplete | None = None) -> None: ... - -class SchemaType(SchemaEventTarget): - name: Any - schema: Any - metadata: Any - inherit_schema: Any - def __init__( - self, - name: Incomplete | None = None, - schema: Incomplete | None = None, - metadata: Incomplete | None = None, - inherit_schema: bool = False, - quote: Incomplete | None = None, - _create_events: bool = True, - ) -> None: ... - def copy(self, **kw): ... - def adapt(self, impltype, **kw): ... - @property - def bind(self): ... - def create(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... - def drop(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... - -class Enum(Emulated, String, SchemaType): - __visit_name__: str - def __init__(self, *enums, **kw) -> None: ... - @property - def sort_key_function(self): ... - @property - def native(self): ... - - class Comparator(Concatenable.Comparator[Any]): ... - comparator_factory: Any - def as_generic(self, allow_nulltype: bool = False): ... - def adapt_to_emulated(self, impltype, **kw): ... - def adapt(self, impltype, **kw): ... - def literal_processor(self, dialect): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - def copy(self, **kw): ... - @property - def python_type(self): ... - -class PickleType(TypeDecorator): - impl: Any - cache_ok: bool - protocol: Any - pickler: Any - comparator: Any - def __init__( - self, protocol=5, pickler: Incomplete | None = None, comparator: Incomplete | None = None, impl: Incomplete | None = None - ) -> None: ... - def __reduce__(self): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - def compare_values(self, x, y): ... - -class Boolean(Emulated, TypeEngine, SchemaType): # type: ignore[misc] - __visit_name__: str - native: bool - create_constraint: Any - name: Any - def __init__(self, create_constraint: bool = False, name: Incomplete | None = None, _create_events: bool = True) -> None: ... - @property - def python_type(self): ... - def literal_processor(self, dialect): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class _AbstractInterval(_LookupExpressionAdapter, TypeEngine): - def coerce_compared_value(self, op, value): ... - -class Interval(Emulated, _AbstractInterval, TypeDecorator): # type: ignore[misc] - impl: Any - epoch: Any - cache_ok: bool - native: Any - second_precision: Any - day_precision: Any - def __init__( - self, native: bool = True, second_precision: Incomplete | None = None, day_precision: Incomplete | None = None - ) -> None: ... - @property - def python_type(self): ... - def adapt_to_emulated(self, impltype, **kw): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class JSON(Indexable, TypeEngine): - __visit_name__: str - hashable: bool - NULL: Any - none_as_null: Any - def __init__(self, none_as_null: bool = False) -> 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 JSONIntIndexType(JSONIndexType): ... - class JSONStrIndexType(JSONIndexType): ... - class JSONPathType(JSONElementType): ... - - class Comparator(Indexable.Comparator[Any], Concatenable.Comparator[Any]): - def as_boolean(self): ... - def as_string(self): ... - def as_integer(self): ... - def as_float(self): ... - def as_numeric(self, precision, scale, asdecimal: bool = True): ... - def as_json(self): ... - comparator_factory: Any - @property - def python_type(self): ... - @property # type: ignore[override] - def should_evaluate_none(self): ... - @should_evaluate_none.setter - def should_evaluate_none(self, value) -> None: ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - -class ARRAY(SchemaEventTarget, Indexable, Concatenable, TypeEngine): - __visit_name__: str - zero_indexes: bool - - class Comparator(Indexable.Comparator[_T], Concatenable.Comparator[_T], Generic[_T]): - def contains(self, *arg, **kw) -> ColumnOperators[_T]: ... - def any(self, other, operator: Incomplete | None = None): ... - def all(self, other, operator: Incomplete | None = None): ... - comparator_factory: Any - item_type: Any - as_tuple: Any - dimensions: Any - def __init__( - self, item_type, as_tuple: bool = False, dimensions: Incomplete | None = None, zero_indexes: bool = False - ) -> None: ... - @property - def hashable(self): ... - @property - def python_type(self): ... - def compare_values(self, x, y): ... - -class TupleType(TypeEngine): - types: Any - def __init__(self, *types) -> None: ... - def result_processor(self, dialect, coltype) -> None: ... - -class REAL(Float): - __visit_name__: str - -class FLOAT(Float): - __visit_name__: str - -class NUMERIC(Numeric): - __visit_name__: str - -class DECIMAL(Numeric): - __visit_name__: str - -class INTEGER(Integer): - __visit_name__: str - -INT = INTEGER - -class SMALLINT(SmallInteger): - __visit_name__: str - -class BIGINT(BigInteger): - __visit_name__: str - -class TIMESTAMP(DateTime): - __visit_name__: str - def __init__(self, timezone: bool = False) -> None: ... - def get_dbapi_type(self, dbapi): ... - -class DATETIME(DateTime): - __visit_name__: str - -class DATE(Date): - __visit_name__: str - -class TIME(Time): - __visit_name__: str - -class TEXT(Text): - __visit_name__: str - -class CLOB(Text): - __visit_name__: str - -class VARCHAR(String): - __visit_name__: str - -class NVARCHAR(Unicode): - __visit_name__: str - -class CHAR(String): - __visit_name__: str - -class NCHAR(Unicode): - __visit_name__: str - -class BLOB(LargeBinary): - __visit_name__: str - -class BINARY(_Binary): - __visit_name__: str - -class VARBINARY(_Binary): - __visit_name__: str - -class BOOLEAN(Boolean): - __visit_name__: str - -class NullType(TypeEngine): - __visit_name__: str - def literal_processor(self, dialect): ... - - class Comparator(TypeEngine.Comparator[Any]): ... - comparator_factory: Any - -class TableValueType(HasCacheKey, TypeEngine): - def __init__(self, *elements) -> None: ... - -class MatchType(Boolean): ... - -NULLTYPE: NullType -BOOLEANTYPE: Boolean -STRINGTYPE: String -INTEGERTYPE: Integer -NUMERICTYPE: Numeric -MATCHTYPE: MatchType -TABLEVALUE: TableValueType -DATETIME_TIMEZONE: DateTime -TIME_TIMEZONE: Time diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi deleted file mode 100644 index 391287e827c8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi +++ /dev/null @@ -1,157 +0,0 @@ -from typing import Any - -from ..util.langhelpers import HasMemoized, MemoizedSlots -from .visitors import ExtendedInternalTraversal, InternalTraversal - -SKIP_TRAVERSE: Any -COMPARE_FAILED: bool -COMPARE_SUCCEEDED: bool -NO_CACHE: Any -CACHE_IN_PLACE: Any -CALL_GEN_CACHE_KEY: Any -STATIC_CACHE_KEY: Any -PROPAGATE_ATTRS: Any -ANON_NAME: Any - -def compare(obj1, obj2, **kw): ... - -class HasCacheKey: - inherit_cache: Any - -class MemoizedHasCacheKey(HasCacheKey, HasMemoized): ... - -class CacheKey: - def __hash__(self) -> int: ... - def to_offline_string(self, statement_cache, statement, parameters): ... - def __eq__(self, other): ... - -class _CacheKey(ExtendedInternalTraversal): - visit_has_cache_key: Any - visit_clauseelement: Any - visit_clauseelement_list: Any - visit_annotations_key: Any - visit_clauseelement_tuple: Any - visit_memoized_select_entities: Any - visit_string: Any - visit_boolean: Any - visit_operator: Any - visit_plain_obj: Any - visit_statement_hint_list: Any - visit_type: Any - visit_anon_name: Any - visit_propagate_attrs: Any - def visit_with_context_options(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_inspectable(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_string_list(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_multi(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_multi_list(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_has_cache_key_tuples(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_has_cache_key_list(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_executable_options(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_inspectable_list(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_clauseelement_tuples(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_fromclause_ordered_set(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_clauseelement_unordered_set(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_named_ddl_element(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_prefix_sequence(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_setup_join_tuple(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_table_hint_list(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_plain_dict(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_dialect_options(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_string_clauseelement_dict(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_string_multi_dict(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_fromclause_canonical_column_collection(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_unknown_structure(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_dml_ordered_values(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_dml_values(self, attrname, obj, parent, anon_map, bindparams): ... - def visit_dml_multi_values(self, attrname, obj, parent, anon_map, bindparams): ... - -class HasCopyInternals: ... - -class _CopyInternals(InternalTraversal): - def visit_clauseelement(self, attrname, parent, element, clone=..., **kw): ... - def visit_clauseelement_list(self, attrname, parent, element, clone=..., **kw): ... - def visit_clauseelement_tuple(self, attrname, parent, element, clone=..., **kw): ... - def visit_executable_options(self, attrname, parent, element, clone=..., **kw): ... - def visit_clauseelement_unordered_set(self, attrname, parent, element, clone=..., **kw): ... - def visit_clauseelement_tuples(self, attrname, parent, element, clone=..., **kw): ... - def visit_string_clauseelement_dict(self, attrname, parent, element, clone=..., **kw): ... - def visit_setup_join_tuple(self, attrname, parent, element, clone=..., **kw): ... - def visit_memoized_select_entities(self, attrname, parent, element, **kw): ... - def visit_dml_ordered_values(self, attrname, parent, element, clone=..., **kw): ... - def visit_dml_values(self, attrname, parent, element, clone=..., **kw): ... - def visit_dml_multi_values(self, attrname, parent, element, clone=..., **kw): ... - def visit_propagate_attrs(self, attrname, parent, element, clone=..., **kw): ... - -class _GetChildren(InternalTraversal): - def visit_has_cache_key(self, element, **kw): ... - def visit_clauseelement(self, element, **kw): ... - def visit_clauseelement_list(self, element, **kw): ... - def visit_clauseelement_tuple(self, element, **kw): ... - def visit_clauseelement_tuples(self, element, **kw): ... - def visit_fromclause_canonical_column_collection(self, element, **kw): ... - def visit_string_clauseelement_dict(self, element, **kw): ... - def visit_fromclause_ordered_set(self, element, **kw): ... - def visit_clauseelement_unordered_set(self, element, **kw): ... - def visit_setup_join_tuple(self, element, **kw) -> None: ... - def visit_memoized_select_entities(self, element, **kw): ... - def visit_dml_ordered_values(self, element, **kw) -> None: ... - def visit_dml_values(self, element, **kw) -> None: ... - def visit_dml_multi_values(self, element, **kw): ... - def visit_propagate_attrs(self, element, **kw): ... - -class anon_map(dict[Any, Any]): - index: int - def __init__(self) -> None: ... - def __missing__(self, key): ... - -class TraversalComparatorStrategy(InternalTraversal, MemoizedSlots): - stack: Any - cache: Any - anon_map: Any - def __init__(self) -> None: ... - def compare(self, obj1, obj2, **kw): ... - def compare_inner(self, obj1, obj2, **kw): ... - def visit_has_cache_key(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_propagate_attrs(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_has_cache_key_list(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_executable_options(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_clauseelement(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_fromclause_canonical_column_collection(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_fromclause_derived_column_collection(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_string_clauseelement_dict(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_clauseelement_tuples(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_clauseelement_list(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_clauseelement_tuple(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_clauseelement_unordered_set(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_fromclause_ordered_set(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_string(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_string_list(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_anon_name(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_boolean(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_operator(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_type(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_plain_dict(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_dialect_options(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_annotations_key(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_with_context_options(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_plain_obj(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_named_ddl_element(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_prefix_sequence(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_setup_join_tuple(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_memoized_select_entities(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_table_hint_list(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_statement_hint_list(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_unknown_structure(self, attrname, left_parent, left, right_parent, right, **kw) -> None: ... - def visit_dml_ordered_values(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_dml_values(self, attrname, left_parent, left, right_parent, right, **kw): ... - def visit_dml_multi_values(self, attrname, left_parent, left, right_parent, right, **kw): ... - def compare_clauselist(self, left, right, **kw): ... - def compare_binary(self, left, right, **kw): ... - def compare_bindparam(self, left, right, **kw): ... - -class ColIdentityComparatorStrategy(TraversalComparatorStrategy): - def compare_column_element(self, left, right, use_proxies: bool = True, equivalents=(), **kw): ... - def compare_column(self, left, right, **kw): ... - def compare_label(self, left, right, **kw): ... - def compare_table(self, left, right, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi deleted file mode 100644 index 951f35774ec8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi +++ /dev/null @@ -1,118 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Generic, TypeVar - -from .. import util -from . import operators -from .base import SchemaEventTarget -from .sqltypes import Boolean -from .visitors import Traversible, TraversibleType - -_T = TypeVar("_T") - -BOOLEANTYPE: Any -INTEGERTYPE: Any -NULLTYPE: Any -NUMERICTYPE: Any -STRINGTYPE: Any -MATCHTYPE: Any -INDEXABLE: Any -TABLEVALUE: Any - -class TypeEngine(Traversible): - class Comparator(operators.ColumnOperators[_T], Generic[_T]): - default_comparator: Any - def __clause_element__(self): ... - expr: Any - type: Any - def __init__(self, expr) -> None: ... - def operate(self, op, *other, **kwargs): ... - def reverse_operate(self, op, other, **kwargs): ... - def __reduce__(self): ... - BOOLEANTYPE: Boolean - hashable: bool - comparator_factory: Any - sort_key_function: Any - should_evaluate_none: bool - def evaluates_none(self): ... - def copy(self, **kw): ... - def compare_against_backend(self, dialect, conn_type) -> None: ... - def copy_value(self, value): ... - def literal_processor(self, dialect) -> None: ... - def bind_processor(self, dialect) -> None: ... - def result_processor(self, dialect, coltype) -> None: ... - def column_expression(self, colexpr) -> None: ... - def bind_expression(self, bindvalue) -> None: ... - def compare_values(self, x, y): ... - def get_dbapi_type(self, dbapi) -> None: ... - @property - def python_type(self) -> None: ... - def with_variant(self, type_, dialect_name): ... - def as_generic(self, allow_nulltype: bool = False): ... - def dialect_impl(self, dialect): ... - def adapt(self, cls, **kw): ... - def coerce_compared_value(self, op, value): ... - def compile(self, dialect: Incomplete | None = None): ... - -class VisitableCheckKWArg(util.EnsureKWArgType, TraversibleType): ... - -class ExternalType: - cache_ok: Any - -class UserDefinedType(ExternalType, TypeEngine, metaclass=VisitableCheckKWArg): - __visit_name__: str - ensure_kwarg: str - def coerce_compared_value(self, op, value): ... - -class Emulated: - def adapt_to_emulated(self, impltype, **kw): ... - def adapt(self, impltype, **kw): ... - -class NativeForEmulated: - @classmethod - def adapt_native_to_emulated(cls, impl, **kw): ... - @classmethod - def adapt_emulated_to_native(cls, impl, **kw): ... - -class TypeDecorator(ExternalType, SchemaEventTarget, TypeEngine): - __visit_name__: str - impl: Any - def __init__(self, *args, **kwargs) -> None: ... - coerce_to_is_types: Any - - class Comparator(TypeEngine.Comparator[Any]): - 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: str): ... - def process_literal_param(self, value, dialect) -> None: ... - def process_bind_param(self, value, dialect) -> None: ... - def process_result_value(self, value, dialect) -> None: ... - def literal_processor(self, dialect): ... - def bind_processor(self, dialect): ... - def result_processor(self, dialect, coltype): ... - def bind_expression(self, bindparam): ... - def column_expression(self, column): ... - def coerce_compared_value(self, op, value): ... - def copy(self, **kw): ... - def get_dbapi_type(self, dbapi): ... - def compare_values(self, x, y): ... - @property - def sort_key_function(self): ... - -class Variant(TypeDecorator): - cache_ok: bool - impl: Any - mapping: 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/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi deleted file mode 100644 index 50e9b145af1f..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi +++ /dev/null @@ -1,104 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . import visitors - -join_condition: Any - -def find_join_source(clauses, join_to): ... -def find_left_clause_that_matches_given(clauses, join_from): ... -def find_left_clause_to_join_from(clauses, join_to, onclause): ... -def visit_binary_product(fn, expr) -> None: ... -def find_tables( - clause, - check_columns: bool = False, - include_aliases: bool = False, - include_joins: bool = False, - include_selects: bool = False, - include_crud: bool = False, -): ... -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 tables_from_leftmost(clause) -> None: ... -def surface_selectables(clause) -> None: ... -def surface_selectables_only(clause) -> None: ... -def extract_first_column_annotation(column, annotation_name): ... -def selectables_overlap(left, right): ... -def bind_values(clause): ... - -class _repr_base: - max_chars: Any - def trunc(self, value): ... - -class _repr_row(_repr_base): - row: Any - max_chars: Any - def __init__(self, row, max_chars: int = 300) -> None: ... - -class _repr_params(_repr_base): - params: Any - ismulti: Any - batches: Any - max_chars: Any - def __init__(self, params, batches, max_chars: int = 300, ismulti: Incomplete | None = None) -> None: ... - -def adapt_criterion_to_null(crit, nulls): ... -def splice_joins(left, right, stop_on: Incomplete | None = None): ... -def reduce_columns(columns, *clauses, **kw): ... -def criterion_as_pairs( - expression, - consider_as_foreign_keys: Incomplete | None = None, - consider_as_referenced_keys: Incomplete | None = None, - any_operator: bool = False, -): ... - -class ClauseAdapter(visitors.ReplacingExternalTraversal): - __traverse_options__: Any - selectable: Any - include_fn: Any - exclude_fn: Any - equivalents: Any - adapt_on_names: Any - adapt_from_selectables: Any - def __init__( - self, - selectable, - equivalents: Incomplete | None = None, - include_fn: Incomplete | None = None, - exclude_fn: Incomplete | None = None, - adapt_on_names: bool = False, - anonymize_labels: bool = False, - adapt_from_selectables: Incomplete | None = None, - ) -> None: ... - def replace(self, col, _include_singleton_constants: bool = False): ... - -class ColumnAdapter(ClauseAdapter): - columns: Any - adapt_required: Any - allow_label_resolve: Any - def __init__( - self, - selectable, - equivalents: Incomplete | None = None, - adapt_required: bool = False, - include_fn: Incomplete | None = None, - exclude_fn: Incomplete | None = None, - adapt_on_names: bool = False, - allow_label_resolve: bool = True, - anonymize_labels: bool = False, - adapt_from_selectables: Incomplete | None = None, - ) -> None: ... - - class _IncludeExcludeMapping: - parent: Any - columns: Any - def __init__(self, parent, columns) -> None: ... - def __getitem__(self, key): ... - - def wrap(self, adapter): ... - def traverse(self, obj): ... - adapt_clause: Any - adapt_list: Any - def adapt_check_present(self, col): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi deleted file mode 100644 index e8378c67ddc0..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi +++ /dev/null @@ -1,86 +0,0 @@ -from typing import Any - -class TraversibleType(type): - def __init__(cls, clsname, bases, clsdict) -> None: ... - -class Traversible(metaclass=TraversibleType): - def __class_getitem__(cls, key): ... - def get_children(self, omit_attrs=(), **kw): ... - -class _InternalTraversalType(type): - def __init__(cls, clsname, bases, clsdict) -> None: ... - -class InternalTraversal(metaclass=_InternalTraversalType): - def dispatch(self, visit_symbol): ... - def run_generated_dispatch(self, target, internal_dispatch, generate_dispatcher_name): ... - def generate_dispatch(self, target_cls, internal_dispatch, generate_dispatcher_name): ... - dp_has_cache_key: Any - dp_has_cache_key_list: Any - dp_clauseelement: Any - dp_fromclause_canonical_column_collection: Any - dp_clauseelement_tuples: Any - dp_clauseelement_list: Any - dp_clauseelement_tuple: Any - dp_executable_options: Any - dp_with_context_options: Any - dp_fromclause_ordered_set: Any - dp_string: Any - dp_string_list: Any - dp_anon_name: Any - dp_boolean: Any - dp_operator: Any - dp_type: Any - dp_plain_dict: Any - dp_dialect_options: Any - dp_string_clauseelement_dict: Any - dp_string_multi_dict: Any - dp_annotations_key: Any - dp_plain_obj: Any - dp_named_ddl_element: Any - dp_prefix_sequence: Any - dp_table_hint_list: Any - dp_setup_join_tuple: Any - dp_memoized_select_entities: Any - dp_statement_hint_list: Any - dp_unknown_structure: Any - dp_dml_ordered_values: Any - dp_dml_values: Any - dp_dml_multi_values: Any - dp_propagate_attrs: Any - -class ExtendedInternalTraversal(InternalTraversal): - dp_ignore: Any - dp_inspectable: Any - dp_multi: Any - dp_multi_list: Any - dp_has_cache_key_tuples: Any - dp_inspectable_list: Any - -class ExternalTraversal: - __traverse_options__: Any - def traverse_single(self, obj, **kw): ... - def iterate(self, obj): ... - def traverse(self, obj): ... - @property - def visitor_iterator(self) -> None: ... - def chain(self, visitor): ... - -class CloningExternalTraversal(ExternalTraversal): - def copy_and_process(self, list_): ... - def traverse(self, obj): ... - -class ReplacingExternalTraversal(CloningExternalTraversal): - def replace(self, elem) -> None: ... - def traverse(self, obj): ... - -Visitable = Traversible -VisitableType = TraversibleType -ClauseVisitor = ExternalTraversal -CloningVisitor = CloningExternalTraversal -ReplacingCloningVisitor = ReplacingExternalTraversal - -def iterate(obj, opts=...) -> None: ... -def traverse_using(iterator, obj, visitors): ... -def traverse(obj, opts, visitors): ... -def cloned_traverse(obj, opts, visitors): ... -def replacement_traverse(obj, opts, replace): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/__init__.pyi deleted file mode 100644 index c03a2b53b4f2..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/__init__.pyi +++ /dev/null @@ -1,77 +0,0 @@ -from . import config as config, mock as mock -from .assertions import ( - AssertsCompiledSQL as AssertsCompiledSQL, - AssertsExecutionResults as AssertsExecutionResults, - ComparesTables as ComparesTables, - assert_raises as assert_raises, - assert_raises_context_ok as assert_raises_context_ok, - assert_raises_message as assert_raises_message, - assert_raises_message_context_ok as assert_raises_message_context_ok, - emits_warning as emits_warning, - emits_warning_on as emits_warning_on, - eq_ as eq_, - eq_ignore_whitespace as eq_ignore_whitespace, - eq_regex as eq_regex, - expect_deprecated as expect_deprecated, - expect_deprecated_20 as expect_deprecated_20, - expect_raises as expect_raises, - expect_raises_message as expect_raises_message, - expect_warnings as expect_warnings, - in_ as in_, - is_ as is_, - is_false as is_false, - is_instance_of as is_instance_of, - is_none as is_none, - is_not as is_not, - is_not_ as is_not_, - is_not_none as is_not_none, - is_true as is_true, - le_ as le_, - ne_ as ne_, - not_in as not_in, - not_in_ as not_in_, - startswith_ as startswith_, - uses_deprecated as uses_deprecated, -) -from .config import ( - async_test as async_test, - combinations as combinations, - combinations_list as combinations_list, - db as db, - fixture as fixture, - requirements, -) -from .exclusions import ( - db_spec as db_spec, - exclude as exclude, - fails as fails, - fails_if as fails_if, - fails_on as fails_on, - fails_on_everything_except as fails_on_everything_except, - future as future, - only_if as only_if, - only_on as only_on, - skip as skip, - skip_if as skip_if, -) -from .schema import eq_clause_element as eq_clause_element, eq_type_affinity as eq_type_affinity -from .util import ( - adict as adict, - fail as fail, - flag_combinations as flag_combinations, - force_drop_names as force_drop_names, - lambda_combinations as lambda_combinations, - metadata_fixture as metadata_fixture, - provide_metadata as provide_metadata, - resolve_lambda as resolve_lambda, - rowset as rowset, - run_as_contextmanager as run_as_contextmanager, - teardown_events as teardown_events, -) -from .warnings import assert_warnings as assert_warnings, warn_test_suite as warn_test_suite - -requires = requirements - -def against(*queries): ... - -crashes = skip diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi deleted file mode 100644 index e0e5f2bfa40d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi +++ /dev/null @@ -1,89 +0,0 @@ -from _typeshed import Incomplete - -def expect_warnings(*messages, **kw): ... -def expect_warnings_on(db, *messages, **kw) -> None: ... -def emits_warning(*messages): ... -def expect_deprecated(*messages, **kw): ... -def expect_deprecated_20(*messages, **kw): ... -def emits_warning_on(db, *messages): ... -def uses_deprecated(*messages): ... -def global_cleanup_assertions() -> None: ... -def int_within_variance(expected, received, variance) -> None: ... -def eq_regex(a, b, msg: Incomplete | None = None) -> None: ... -def eq_(a, b, msg: Incomplete | None = None) -> None: ... -def ne_(a, b, msg: Incomplete | None = None) -> None: ... -def le_(a, b, msg: Incomplete | None = None) -> None: ... -def is_instance_of(a, b, msg: Incomplete | None = None) -> None: ... -def is_none(a, msg: Incomplete | None = None) -> None: ... -def is_not_none(a, msg: Incomplete | None = None) -> None: ... -def is_true(a, msg: Incomplete | None = None) -> None: ... -def is_false(a, msg: Incomplete | None = None) -> None: ... -def is_(a, b, msg: Incomplete | None = None) -> None: ... -def is_not(a, b, msg: Incomplete | None = None) -> None: ... - -is_not_ = is_not - -def in_(a, b, msg: Incomplete | None = None) -> None: ... -def not_in(a, b, msg: Incomplete | None = None) -> None: ... - -not_in_ = not_in - -def startswith_(a, fragment, msg: Incomplete | None = None) -> None: ... -def eq_ignore_whitespace(a, b, msg: Incomplete | None = None) -> None: ... -def assert_raises(except_cls, callable_, *args, **kw): ... -def assert_raises_context_ok(except_cls, callable_, *args, **kw): ... -def assert_raises_message(except_cls, msg, callable_, *args, **kwargs): ... -def assert_warns(except_cls, callable_, *args, **kwargs): ... -def assert_warns_message(except_cls, msg, callable_, *args, **kwargs): ... -def assert_raises_message_context_ok(except_cls, msg, callable_, *args, **kwargs): ... - -class _ErrorContainer: - error: Incomplete - -def expect_raises(except_cls, check_context: bool = True): ... -def expect_raises_message(except_cls, msg, check_context: bool = True): ... - -class AssertsCompiledSQL: - test_statement: Incomplete - supports_execution: Incomplete - def assert_compile( - self, - clause, - result, - params: Incomplete | None = None, - checkparams: Incomplete | None = None, - for_executemany: bool = False, - check_literal_execute: Incomplete | None = None, - check_post_param: Incomplete | None = None, - dialect: Incomplete | None = None, - checkpositional: Incomplete | None = None, - check_prefetch: Incomplete | None = None, - use_default_dialect: bool = False, - allow_dialect_select: bool = False, - supports_default_values: bool = True, - supports_default_metavalue: bool = True, - literal_binds: bool = False, - render_postcompile: bool = False, - schema_translate_map: Incomplete | None = None, - render_schema_translate: bool = False, - default_schema_name: Incomplete | None = None, - from_linting: bool = False, - check_param_order: bool = True, - ) -> None: ... - -class ComparesTables: - def assert_tables_equal(self, table, reflected_table, strict_types: bool = False) -> None: ... - def assert_types_base(self, c1, c2) -> None: ... - -class AssertsExecutionResults: - def assert_result(self, result, class_, *objects) -> None: ... - def assert_list(self, result, class_, list_) -> None: ... - def assert_row(self, class_, rowobj, desc) -> None: ... - def assert_unordered_result(self, result, cls, *expected): ... - def sql_execution_asserter(self, db: Incomplete | None = None): ... - def assert_sql_execution(self, db, callable_, *rules): ... - def assert_sql(self, db, callable_, rules): ... - def assert_sql_count(self, db, callable_, count) -> None: ... - def assert_multiple_sql_count(self, dbs, callable_, counts): ... - def assert_execution(self, db, *rules) -> None: ... - def assert_statement_count(self, db, count): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi deleted file mode 100644 index c7534746d038..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi +++ /dev/null @@ -1,82 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class AssertRule: - is_consumed: bool - errormessage: Any - consume_statement: bool - def process_statement(self, execute_observed) -> None: ... - def no_more_statements(self) -> None: ... - -class SQLMatchRule(AssertRule): ... - -class CursorSQL(SQLMatchRule): - statement: Any - params: Any - consume_statement: Any - def __init__(self, statement, params: Incomplete | None = None, consume_statement: bool = True) -> None: ... - errormessage: Any - is_consumed: bool - def process_statement(self, execute_observed) -> None: ... - -class CompiledSQL(SQLMatchRule): - statement: Any - params: Any - dialect: Any - def __init__(self, statement, params: Incomplete | None = None, dialect: str = "default") -> None: ... - is_consumed: bool - errormessage: Any - def process_statement(self, execute_observed) -> None: ... - -class RegexSQL(CompiledSQL): - regex: Any - orig_regex: Any - params: Any - dialect: Any - def __init__(self, regex, params: Incomplete | None = None, dialect: str = "default") -> None: ... - -class DialectSQL(CompiledSQL): ... - -class CountStatements(AssertRule): - count: Any - def __init__(self, count) -> None: ... - def process_statement(self, execute_observed) -> None: ... - def no_more_statements(self) -> None: ... - -class AllOf(AssertRule): - rules: Any - def __init__(self, *rules) -> None: ... - is_consumed: bool - errormessage: Any - def process_statement(self, execute_observed) -> None: ... - -class EachOf(AssertRule): - rules: Any - def __init__(self, *rules) -> None: ... - errormessage: Any - is_consumed: bool - def process_statement(self, execute_observed) -> None: ... - def no_more_statements(self) -> None: ... - -class Conditional(EachOf): - def __init__(self, condition, rules, else_rules) -> None: ... - -class Or(AllOf): - is_consumed: bool - errormessage: Any - def process_statement(self, execute_observed) -> None: ... - -class SQLExecuteObserved: - context: Any - clauseelement: Any - parameters: Any - statements: Any - def __init__(self, context, clauseelement, multiparams, params) -> None: ... - -class SQLCursorExecuteObserved: ... - -class SQLAsserter: - accumulated: Any - def assert_(self, *rules) -> None: ... - -def assert_engine(engine) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/asyncio.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/asyncio.pyi deleted file mode 100644 index 7455e47b8f46..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/asyncio.pyi +++ /dev/null @@ -1 +0,0 @@ -ENABLE_ASYNCIO: bool diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/config.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/config.pyi deleted file mode 100644 index 757a7ec36f19..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/config.pyi +++ /dev/null @@ -1,58 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, Protocol - -requirements: Incomplete | None -db: Incomplete | None -db_url: Incomplete | None -db_opts: Incomplete | None -file_config: Incomplete | None -test_schema: str | None -test_schema_2: str | None -any_async: bool -ident: str - -def combinations(*comb, **kw): ... -def combinations_list(arg_iterable, **kw): ... -def variation(argname, cases): ... -def fixture(*arg, **kw): ... -def get_current_test_name(): ... -def mark_base_test_class(): ... - -# Matches the intersection of the config module and the Config class -class _ConfigProtocol(Protocol): # noqa: Y046 - db: Incomplete - db_opts: Incomplete - file_config: Incomplete - test_schema: Any # AnyOf[str, None] - test_schema_2: Any # AnyOf[str, None] - def skip_test(self, msg) -> None: ... - -class Config: - db: Incomplete - db_opts: Incomplete - options: Incomplete - file_config: Incomplete - test_schema: str - test_schema_2: str - is_async: Incomplete - def __init__(self, db, db_opts, options, file_config) -> None: ... - @classmethod - def register(cls, db, db_opts, options, file_config) -> Config: ... - @classmethod - def set_as_current(cls, config, namespace) -> None: ... - @classmethod - def push_engine(cls, db, namespace) -> None: ... - @classmethod - def push(cls, config, namespace) -> None: ... - @classmethod - def pop(cls, namespace) -> None: ... - @classmethod - def reset(cls, namespace) -> None: ... - @classmethod - def all_configs(cls): ... - @classmethod - def all_dbs(cls) -> None: ... - def skip_test(self, msg) -> None: ... - -def skip_test(msg) -> None: ... -def async_test(fn): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi deleted file mode 100644 index 1ef8da6dba4c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi +++ /dev/null @@ -1,83 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Mapping -from typing import Any, overload -from typing_extensions import Literal - -from ..engine import Engine -from ..engine.url import URL -from ..ext.asyncio import AsyncEngine - -class ConnectionKiller: - proxy_refs: Any - testing_engines: Any - dbapi_connections: Any - def add_pool(self, pool) -> None: ... - def add_engine(self, engine, scope) -> None: ... - def rollback_all(self) -> None: ... - def checkin_all(self) -> None: ... - def close_all(self) -> None: ... - def prepare_for_drop_tables(self, connection) -> None: ... - def after_test(self) -> None: ... - def after_test_outside_fixtures(self, test) -> None: ... - def stop_test_class_inside_fixtures(self) -> None: ... - def stop_test_class_outside_fixtures(self) -> None: ... - def final_cleanup(self) -> None: ... - def assert_all_closed(self) -> None: ... - -testing_reaper: Any - -def assert_conns_closed(fn, *args, **kw) -> None: ... -def rollback_open_connections(fn, *args, **kw) -> None: ... -def close_first(fn, *args, **kw) -> None: ... -def close_open_connections(fn, *args, **kw) -> None: ... -def all_dialects(exclude: Incomplete | None = None) -> None: ... - -class ReconnectFixture: - dbapi: Any - connections: Any - is_stopped: bool - def __init__(self, dbapi) -> None: ... - def __getattr__(self, key: str): ... - def connect(self, *args, **kwargs): ... - def shutdown(self, stop: bool = False) -> None: ... - def restart(self) -> None: ... - -def reconnecting_engine(url: Incomplete | None = None, options: Incomplete | None = None): ... -@overload -def testing_engine( # type: ignore[misc] - url: URL | str | None = None, - options: Mapping[str, Any] | None = None, - future: bool | None = None, - asyncio: Literal[False] = False, - transfer_staticpool: bool = False, -) -> Engine: ... -@overload -def testing_engine( - url: URL | str | None = None, - options: Mapping[str, Any] | None = None, - future: bool | None = None, - asyncio: Literal[True] = True, - transfer_staticpool: bool = False, -) -> AsyncEngine: ... -def mock_engine(dialect_name: Incomplete | None = None): ... - -class DBAPIProxyCursor: - engine: Any - connection: Any - cursor: Any - def __init__(self, engine, conn, *args, **kwargs) -> None: ... - def execute(self, stmt, parameters: Incomplete | None = None, **kw): ... - def executemany(self, stmt, params, **kw): ... - def __iter__(self): ... - def __getattr__(self, key: str): ... - -class DBAPIProxyConnection: - conn: Any - engine: Any - cursor_cls: Any - def __init__(self, engine, cursor_cls) -> None: ... - def cursor(self, *args, **kwargs): ... - def close(self) -> None: ... - def __getattr__(self, key: str): ... - -def proxying_engine(conn_cls=..., cursor_cls=...): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/entities.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/entities.pyi deleted file mode 100644 index 514288954228..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/entities.pyi +++ /dev/null @@ -1,9 +0,0 @@ -class BasicEntity: - def __init__(self, **kw) -> None: ... - -class ComparableMixin: - def __ne__(self, other): ... - def __eq__(self, other): ... - -class ComparableEntity(ComparableMixin, BasicEntity): - def __hash__(self) -> int: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi deleted file mode 100644 index f9956ef44058..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi +++ /dev/null @@ -1,80 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def skip_if(predicate, reason: Incomplete | None = None): ... -def fails_if(predicate, reason: Incomplete | None = None): ... - -class compound: - fails: Any - skips: Any - tags: Any - def __add__(self, other): ... - def as_skips(self): ... - 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) -> None: ... - -def requires_tag(tagname): ... -def tags(tagnames): ... -def only_if(predicate, reason: Incomplete | None = None): ... -def succeeds_if(predicate, reason: Incomplete | None = None): ... - -class Predicate: - @classmethod - def as_predicate(cls, predicate, description: Incomplete | None = None): ... - -class BooleanPredicate(Predicate): - value: Any - description: Any - def __init__(self, value, description: Incomplete | None = None) -> None: ... - def __call__(self, config): ... - -class SpecPredicate(Predicate): - db: Any - op: Any - spec: Any - description: Any - def __init__( - self, db, op: Incomplete | None = None, spec: Incomplete | None = None, description: Incomplete | None = None - ) -> None: ... - def __call__(self, config): ... - -class LambdaPredicate(Predicate): - lambda_: Any - args: Any - kw: Any - description: Any - def __init__( - self, lambda_, description: Incomplete | None = None, args: Incomplete | None = None, kw: Incomplete | None = None - ): ... - def __call__(self, config): ... - -class NotPredicate(Predicate): - predicate: Any - description: Any - def __init__(self, predicate, description: Incomplete | None = None) -> None: ... - def __call__(self, config): ... - -class OrPredicate(Predicate): - predicates: Any - description: Any - def __init__(self, predicates, description: Incomplete | None = None) -> None: ... - def __call__(self, config): ... - -def db_spec(*dbs): ... -def open(): ... -def closed(): ... -def fails(reason: Incomplete | None = None): ... -def future(fn, *arg): ... -def fails_on(db, reason: Incomplete | None = None): ... -def fails_on_everything_except(*dbs): ... -def skip(db, reason: Incomplete | None = None): ... -def only_on(dbs, reason: Incomplete | None = None): ... -def exclude(db, op, spec, reason: Incomplete | None = None): ... -def against(config, *queries): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/fixtures.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/fixtures.pyi deleted file mode 100644 index 817046c91010..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/fixtures.pyi +++ /dev/null @@ -1,84 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . import assertions -from .entities import ComparableEntity as ComparableEntity - -class TestBase: - __requires__: Any - __unsupported_on__: Any - __only_on__: Any - __skip_if__: Any - __leave_connections_for_teardown__: bool - def assert_(self, val, msg: Incomplete | None = ...) -> None: ... - def connection_no_trans(self) -> None: ... - def connection(self) -> None: ... - def registry(self, metadata) -> None: ... - def future_connection(self, future_engine, connection) -> None: ... - def future_engine(self) -> None: ... - def testing_engine(self): ... - def async_testing_engine(self, testing_engine): ... - def metadata(self, request) -> None: ... - def trans_ctx_manager_fixture(self, request, metadata): ... - -class FutureEngineMixin: ... - -class TablesTest(TestBase): - run_setup_bind: str - run_define_tables: str - run_create_tables: str - run_inserts: str - run_deletes: str - run_dispose_bind: Any - bind: Any - tables: Any - other: Any - sequences: Any - @property - def tables_test_metadata(self): ... - @classmethod - def setup_bind(cls): ... - @classmethod - def dispose_bind(cls, bind) -> None: ... - @classmethod - def define_tables(cls, metadata) -> None: ... - @classmethod - def fixtures(cls): ... - @classmethod - def insert_data(cls, connection) -> None: ... - def sql_count_(self, count, fn) -> None: ... - def sql_eq_(self, callable_, statements) -> None: ... - -class NoCache: ... - -class RemovesEvents: - def event_listen(self, target, name, fn, **kw) -> None: ... - -def fixture_session(**kw): ... -def stop_test_class_inside_fixtures(cls) -> None: ... -def after_test() -> None: ... - -class ORMTest(TestBase): ... - -class MappedTest(TablesTest, assertions.AssertsExecutionResults): - run_setup_classes: str - run_setup_mappers: str - classes: Any - @classmethod - def setup_classes(cls) -> None: ... - @classmethod - def setup_mappers(cls) -> None: ... - -class DeclarativeMappedTest(MappedTest): - run_setup_classes: str - run_setup_mappers: str - -class ComputedReflectionFixtureTest(TablesTest): - run_inserts: Any - run_deletes: Any - __backend__: bool - __requires__: Any - regexp: Any - def normalize(self, text): ... - @classmethod - def define_tables(cls, metadata) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/mock.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/mock.pyi deleted file mode 100644 index b20ebabfd781..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/mock.pyi +++ /dev/null @@ -1 +0,0 @@ -from unittest.mock import ANY as ANY, MagicMock as MagicMock, Mock as Mock, call as call, patch as patch diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/pickleable.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/pickleable.pyi deleted file mode 100644 index a66684a8039b..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/pickleable.pyi +++ /dev/null @@ -1,63 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from . 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: Any - parent: Any - def __init__(self, obj, parent: Incomplete | None = ...) -> None: ... - -class Foo: - data: str - stuff: Any - moredata: Any - def __init__(self, moredata, stuff: str = ...) -> None: ... - __hash__ = object.__hash__ - def __eq__(self, other): ... - -class Bar: - x: Any - y: Any - def __init__(self, x, y) -> None: ... - __hash__ = object.__hash__ - def __eq__(self, other): ... - -class OldSchool: - x: Any - y: Any - def __init__(self, x, y) -> None: ... - def __eq__(self, other): ... - -class OldSchoolWithoutCompare: - x: Any - y: Any - def __init__(self, x, y) -> None: ... - -class BarWithoutCompare: - x: Any - y: Any - def __init__(self, x, y) -> None: ... - -class NotComparable: - data: Any - def __init__(self, data) -> None: ... - def __hash__(self) -> int: ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class BrokenComparable: - data: Any - def __init__(self, data) -> None: ... - def __hash__(self) -> int: ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/plugin/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/bootstrap.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/plugin/bootstrap.pyi deleted file mode 100644 index 5c554d0de466..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/bootstrap.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Any - -bootstrap_file: Any -to_bootstrap: Any - -def load_file_as_module(name): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/plugin_base.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/plugin/plugin_base.pyi deleted file mode 100644 index 8bb1c05c69e7..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/plugin_base.pyi +++ /dev/null @@ -1,62 +0,0 @@ -from abc import ABC as ABC, ABCMeta, abstractmethod -from typing import Any - -bootstrapped_as_sqlalchemy: bool -log: Any -py3k: Any - -fixtures: Any -engines: Any -exclusions: Any -warnings: Any -profiling: Any -provision: Any -assertions: Any -requirements: Any -config: Any -testing: Any -util: Any -file_config: Any -include_tags: Any -exclude_tags: Any -options: Any - -def setup_options(make_option) -> None: ... -def configure_follower(follower_ident) -> None: ... -def memoize_important_follower_config(dict_) -> None: ... -def restore_important_follower_config(dict_) -> None: ... -def read_config() -> None: ... -def pre_begin(opt) -> None: ... -def set_coverage_flag(value) -> None: ... -def post_begin() -> None: ... - -pre_configure: Any -post_configure: Any - -def pre(fn): ... -def post(fn): ... -def want_class(name, cls): ... -def want_method(cls, fn): ... -def generate_sub_tests(cls, module) -> None: ... -def start_test_class_outside_fixtures(cls) -> None: ... -def stop_test_class(cls) -> None: ... -def stop_test_class_outside_fixtures(cls) -> None: ... -def final_process_cleanup() -> None: ... -def before_test(test, test_module_name, test_class, test_name) -> None: ... -def after_test(test) -> None: ... -def after_test_fixtures(test) -> None: ... - -class FixtureFunctions(ABC, metaclass=ABCMeta): - @abstractmethod - def skip_test_exception(self, *arg, **kw): ... - @abstractmethod - def combinations(self, *args, **kw): ... - @abstractmethod - def param_ident(self, *args, **kw): ... - @abstractmethod - def fixture(self, *arg, **kw): ... - def get_current_test_name(self) -> None: ... - @abstractmethod - def mark_base_test_class(self): ... - -def set_fixture_functions(fixture_fn_class) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/pytestplugin.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/plugin/pytestplugin.pyi deleted file mode 100644 index 757a2a0e0e0e..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/pytestplugin.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from typing_extensions import Final - -from . import plugin_base - -py2k: Final = False - -def pytest_addoption(parser) -> None: ... -def pytest_configure(config) -> None: ... - -DUMP_PYANNOTATE: bool - -def collect_types_fixture() -> None: ... -def pytest_sessionstart(session) -> None: ... -def pytest_sessionfinish(session) -> None: ... -def pytest_collection_finish(session): ... - -class XDistHooks: - def pytest_configure_node(self, node) -> None: ... - def pytest_testnodedown(self, node, error) -> None: ... - -def pytest_collection_modifyitems(session, config, items): ... -def pytest_pycollect_makeitem(collector, name, obj): ... -def pytest_runtest_setup(item) -> None: ... -def pytest_runtest_teardown(item, nextitem) -> None: ... -def pytest_runtest_call(item) -> None: ... -def pytest_runtest_logreport(report) -> None: ... -def setup_class_methods(request) -> None: ... -def setup_test_methods(request) -> None: ... -def getargspec(fn): ... - -class PytestFixtureFunctions(plugin_base.FixtureFunctions): - def skip_test_exception(self, *arg, **kw): ... - def mark_base_test_class(self): ... - def combinations(self, *arg_sets, **kw): ... - def param_ident(self, *parameters): ... - def fixture(self, *arg, **kw): ... - def get_current_test_name(self): ... - def async_test(self, fn): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/reinvent_fixtures_py2k.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/plugin/reinvent_fixtures_py2k.pyi deleted file mode 100644 index 83f3da8643b7..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/plugin/reinvent_fixtures_py2k.pyi +++ /dev/null @@ -1,6 +0,0 @@ -def add_fixture(fn, fixture) -> None: ... -def scan_for_fixtures_to_use_for_class(item) -> None: ... -def run_class_fixture_setup(request) -> None: ... -def run_class_fixture_teardown(request) -> None: ... -def run_fn_fixture_setup(request) -> None: ... -def run_fn_fixture_teardown(request) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi deleted file mode 100644 index c2aa3d0d0525..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi +++ /dev/null @@ -1,21 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class ProfileStatsFile: - force_write: Any - write: Any - fname: Any - short_fname: Any - data: Any - dump: Any - sort: Any - def __init__(self, filename, sort: str = "cumulative", dump: Incomplete | None = None): ... - @property - def platform_key(self): ... - def has_stats(self): ... - def result(self, callcount): ... - def reset_count(self) -> None: ... - def replace(self, callcount) -> None: ... - -def function_call_count(variance: float = 0.05, times: int = 1, warmup: int = 0): ... -def count_functions(variance: float = 0.05) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi deleted file mode 100644 index ca85efb205c9..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi +++ /dev/null @@ -1,62 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from logging import Logger -from typing import Any, Generic, NoReturn, TypeVar -from typing_extensions import Self - -from ..engine.interfaces import Connectable -from ..engine.url import URL -from .config import Config, _ConfigProtocol - -_S = TypeVar("_S", bound=str) -_U = TypeVar("_U", bound=URL) -_F = TypeVar("_F", bound=Callable[..., str | URL | None]) - -log: Logger -FOLLOWER_IDENT: Incomplete | None - -def create_follower_db(follower_ident) -> None: ... -def setup_config(db_url, options, file_config, follower_ident) -> Config: ... -def drop_follower_db(follower_ident) -> None: ... -def generate_db_urls(db_urls, extra_drivers) -> None: ... -def drop_all_schema_objects(cfg, eng) -> None: ... -def reap_dbs(idents_file) -> None: ... - -class register(Generic[_F]): - fns: dict[str, _F] - @classmethod - def init(cls, fn: _F) -> Self: ... - def for_db(self, *dbnames: str) -> Callable[[_F], Self]: ... - # Impossible to specify the args from the generic Callable in the current type system - def __call__(self, cfg: str | URL | _ConfigProtocol, *arg: Any) -> str | URL | None: ... # AnyOf[str | URL | None] - -@register.init -def generate_driver_url(url: _U, driver: str, query_str: str) -> _U | None: ... -@register.init -def drop_all_schema_objects_pre_tables(cfg: Unused, eng: Unused) -> None: ... -@register.init -def drop_all_schema_objects_post_tables(cfg: Unused, eng: Unused) -> None: ... -@register.init -def create_db(cfg: Unused, eng: Connectable, ident: Unused) -> NoReturn: ... -@register.init -def drop_db(cfg: Unused, eng: Connectable, ident: Unused) -> NoReturn: ... -@register.init -def update_db_opts(db_url: Unused, db_opts: Unused) -> None: ... -@register.init -def post_configure_engine(url: Unused, engine: Unused, follower_ident: Unused) -> None: ... -@register.init -def follower_url_from_main(url: _U, ident: str) -> _U: ... -@register.init -def configure_follower(cfg: Unused, ident: Unused) -> None: ... -@register.init -def run_reap_dbs(url: Unused, ident: Unused) -> None: ... -@register.init -def temp_table_keyword_args(cfg: Unused, eng: Connectable) -> NoReturn: ... -@register.init -def prepare_for_drop_tables(config: Unused, connection: Unused) -> None: ... -@register.init -def stop_test_class_outside_fixtures(config: Unused, db: Unused, testcls: Unused) -> None: ... -@register.init # type: ignore[type-var] # False-positive, _S is bound to str -def get_temp_table_name(cfg: Unused, eng: Unused, base_name: _S) -> _S: ... -@register.init -def set_default_schema_on_connection(cfg: _ConfigProtocol, dbapi_connection: Unused, schema_name: Unused) -> NoReturn: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/requirements.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/requirements.pyi deleted file mode 100644 index a3e4c1d1170c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/requirements.pyi +++ /dev/null @@ -1,399 +0,0 @@ -from ..testing.exclusions import compound - -class Requirements: ... - -class SuiteRequirements(Requirements): - @property - def create_table(self): ... - @property - def drop_table(self): ... - @property - def table_ddl_if_exists(self): ... - @property - def index_ddl_if_exists(self): ... - @property - def foreign_keys(self): ... - @property - def table_value_constructor(self): ... - @property - def standard_cursor_sql(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 queue_pool(self): ... - @property - def self_referential_foreign_keys(self): ... - @property - def foreign_key_ddl(self): ... - @property - def named_constraints(self): ... - @property - def implicitly_named_constraints(self): ... - @property - def unusual_column_name_characters(self) -> compound: ... - @property - def subqueries(self): ... - @property - def offset(self): ... - @property - def bound_limit_offset(self): ... - @property - def sql_expression_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 nullable_booleans(self): ... - @property - def nullsordering(self): ... - @property - def standalone_binds(self): ... - @property - def standalone_null_binds_whereclause(self): ... - @property - def intersect(self): ... - @property - def except_(self): ... - @property - def window_functions(self): ... - @property - def ctes(self): ... - @property - def ctes_with_update_delete(self): ... - @property - def ctes_on_dml(self): ... - @property - def autoincrement_insert(self): ... - @property - def fetch_rows_post_commit(self): ... - @property - def group_by_complex_expression(self): ... - @property - def sane_rowcount(self): ... - @property - def sane_multi_rowcount(self): ... - @property - def sane_rowcount_w_returning(self): ... - @property - def empty_inserts(self): ... - @property - def empty_inserts_executemany(self): ... - @property - def insert_from_select(self): ... - @property - def full_returning(self): ... - @property - def insert_executemany_returning(self): ... - @property - def returning(self): ... - @property - def tuple_in(self): ... - @property - def tuple_in_w_empty(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 emulated_lastrowid_even_with_sequences(self): ... - @property - def dbapi_lastrowid(self): ... - @property - def views(self): ... - @property - def schemas(self): ... - @property - def cross_schema_fk_reflection(self): ... - @property - def foreign_key_constraint_name_reflection(self): ... - @property - def implicit_default_schema(self): ... - @property - def default_schema_name_switch(self): ... - @property - def server_side_cursors(self): ... - @property - def sequences(self): ... - @property - def no_sequences(self): ... - @property - def sequences_optional(self): ... - @property - def supports_lastrowid(self): ... - @property - def no_lastrowid_support(self): ... - @property - def reflects_pk_names(self): ... - @property - def table_reflection(self): ... - @property - def reflect_tables_no_columns(self): ... - @property - def comment_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_ondelete(self): ... - @property - def fk_constraint_option_reflection_ondelete_restrict(self): ... - @property - def fk_constraint_option_reflection_ondelete_noaction(self): ... - @property - def foreign_key_constraint_option_reflection_onupdate(self): ... - @property - def fk_constraint_option_reflection_onupdate_restrict(self): ... - @property - def temp_table_reflection(self): ... - @property - def temp_table_reflect_indexes(self): ... - @property - def temp_table_names(self): ... - @property - def has_temp_table(self) -> compound: ... - @property - def temporary_tables(self): ... - @property - def temporary_views(self): ... - @property - def index_reflection(self): ... - @property - def index_reflects_included_columns(self): ... - @property - def indexes_with_ascdesc(self): ... - @property - def indexes_with_expressions(self): ... - @property - def unique_constraint_reflection(self): ... - @property - def check_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 symbol_names_w_double_quote(self): ... - @property - def datetime_literals(self): ... - @property - def datetime(self): ... - @property - def datetime_timezone(self) -> compound: ... - @property - def time_timezone(self) -> compound: ... - @property - def datetime_implicit_bound(self) -> compound: ... - @property - def datetime_microseconds(self): ... - @property - def timestamp_microseconds(self): ... - @property - def timestamp_microseconds_implicit_bound(self) -> compound: ... - @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 autocommit(self): ... - @property - def isolation_level(self): ... - def get_isolation_levels(self, config) -> None: ... - @property - def json_type(self): ... - @property - def json_array_indexes(self): ... - @property - def json_index_supplementary_unicode_element(self): ... - @property - def legacy_unconditional_json_extract(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 cast_precision_numerics_many_significant_digits(self): ... - @property - def implicit_decimal_binds(self): ... - @property - def nested_aggregates(self): ... - @property - def recursive_fk_cascade(self): ... - @property - def precision_numerics_retains_significant_digits(self): ... - @property - def infinity_floats(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 expressions_against_unbounded_text(self): ... - @property - def selectone(self): ... - @property - def savepoints(self): ... - @property - def two_phase_transactions(self): ... - @property - def update_from(self): ... - @property - def delete_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_col_from_union(self): ... - @property - def order_by_label_with_expression(self): ... - @property - def order_by_collation(self): ... - def get_order_by_collation(self, config) -> None: ... - @property - def unicode_connections(self): ... - @property - def graceful_disconnects(self): ... - @property - def independent_connections(self): ... - @property - def skip_mysql_on_windows(self): ... - @property - def ad_hoc_engines(self): ... - @property - def no_windows(self): ... - @property - def timing_intensive(self): ... - @property - def memory_intensive(self): ... - @property - def threading_with_mock(self): ... - @property - def sqlalchemy2_stubs(self): ... - @property - def python2(self): ... - @property - def python3(self): ... - @property - def pep520(self): ... - @property - def insert_order_dicts(self): ... - @property - def python36(self): ... - @property - def python37(self): ... - @property - def dataclasses(self): ... - @property - def python38(self): ... - @property - def cpython(self): ... - @property - def is64bit(self) -> compound: ... - @property - def patch_library(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): ... - @property - def async_dialect(self): ... - @property - def asyncio(self) -> compound: ... - @property - def greenlet(self): ... - @property - def computed_columns(self): ... - @property - def computed_columns_stored(self): ... - @property - def computed_columns_virtual(self): ... - @property - def computed_columns_default_persisted(self): ... - @property - def computed_columns_reflect_persisted(self): ... - @property - def supports_distinct_on(self): ... - @property - def supports_is_distinct_from(self): ... - @property - def identity_columns(self): ... - @property - def identity_columns_standard(self): ... - @property - def regexp_match(self): ... - @property - def regexp_replace(self): ... - @property - def fetch_first(self): ... - @property - def fetch_percent(self): ... - @property - def fetch_ties(self): ... - @property - def fetch_no_order_by(self): ... - @property - def fetch_offset_with_options(self): ... - @property - def fetch_expression(self): ... - @property - def autoincrement_without_sequence(self): ... - @property - def generic_classes(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/schema.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/schema.pyi deleted file mode 100644 index dc8b62196f67..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/schema.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Any - -def Table(*args, **kw): ... -def Column(*args, **kw): ... - -class eq_type_affinity: - target: Any - def __init__(self, target) -> None: ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class eq_clause_element: - target: Any - def __init__(self, target) -> None: ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi deleted file mode 100644 index 6e5ba05c8f53..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi +++ /dev/null @@ -1,41 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def non_refcount_gc_collect(*args) -> None: ... # only present on Python implementations with non-refcount gc -def gc_collect(generation: int = 2) -> None: ... -def lazy_gc() -> None: ... -def picklers(): ... -def random_choices(population, k: int = 1): ... -def round_decimal(value, prec): ... - -class RandomSet(set[Any]): - 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) -> None: ... -def provide_metadata(fn, *args, **kw): ... -def flag_combinations(*combinations): ... -def lambda_combinations(lambda_arg_sets, **kw): ... -def resolve_lambda(__fn, **kw): ... -def metadata_fixture(ddl: str = "function"): ... -def force_drop_names(*names): ... - -class adict(dict[Any, Any]): - def __getattribute__(self, key: str): ... - def __call__(self, *keys): ... - get_all: Any - -def drop_all_tables_from_metadata(metadata, engine_or_connection) -> None: ... -def drop_all_tables(engine, inspector, schema: Incomplete | None = None, include_names: Incomplete | None = None) -> None: ... -def total_size(o) -> int: ... -def teardown_events(event_cls): ... -def count_cache_key_tuples(tup) -> int: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi deleted file mode 100644 index 7c72efd57763..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from .. import exc as sa_exc - -class SATestSuiteWarning(sa_exc.SAWarning): ... - -def warn_test_suite(message) -> None: ... -def setup_filters() -> None: ... -def assert_warnings(fn, warning_msgs, regex: bool = False): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/types.pyi b/stubs/SQLAlchemy/sqlalchemy/types.pyi deleted file mode 100644 index ee455334d03a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/types.pyi +++ /dev/null @@ -1,106 +0,0 @@ -from .sql.sqltypes import ( - ARRAY as ARRAY, - BIGINT as BIGINT, - BINARY as BINARY, - BLOB as BLOB, - BOOLEAN as BOOLEAN, - CHAR as CHAR, - CLOB as CLOB, - DATE as DATE, - DATETIME as DATETIME, - DECIMAL as DECIMAL, - FLOAT as FLOAT, - INT as INT, - INTEGER as INTEGER, - JSON as JSON, - NCHAR as NCHAR, - NUMERIC as NUMERIC, - NVARCHAR as NVARCHAR, - REAL as REAL, - SMALLINT as SMALLINT, - TEXT as TEXT, - TIME as TIME, - TIMESTAMP as TIMESTAMP, - VARBINARY as VARBINARY, - VARCHAR as VARCHAR, - BigInteger as BigInteger, - Boolean as Boolean, - Concatenable as Concatenable, - Date as Date, - DateTime as DateTime, - Enum as Enum, - Float as Float, - Indexable as Indexable, - Integer as Integer, - Interval as Interval, - LargeBinary as LargeBinary, - MatchType as MatchType, - NullType as NullType, - Numeric as Numeric, - PickleType as PickleType, - SmallInteger as SmallInteger, - String as String, - Text as Text, - Time as Time, - TupleType as TupleType, - Unicode as Unicode, - UnicodeText as UnicodeText, - _Binary as _Binary, -) -from .sql.type_api import ( - ExternalType as ExternalType, - TypeDecorator as TypeDecorator, - TypeEngine as TypeEngine, - UserDefinedType as UserDefinedType, -) - -__all__ = [ - "TypeEngine", - "TypeDecorator", - "UserDefinedType", - "ExternalType", - "INT", - "CHAR", - "VARCHAR", - "NCHAR", - "NVARCHAR", - "TEXT", - "Text", - "FLOAT", - "NUMERIC", - "REAL", - "DECIMAL", - "TIMESTAMP", - "DATETIME", - "CLOB", - "BLOB", - "BINARY", - "VARBINARY", - "BOOLEAN", - "BIGINT", - "SMALLINT", - "INTEGER", - "DATE", - "TIME", - "TupleType", - "String", - "Integer", - "SmallInteger", - "BigInteger", - "Numeric", - "Float", - "DateTime", - "Date", - "Time", - "LargeBinary", - "Boolean", - "Unicode", - "Concatenable", - "UnicodeText", - "PickleType", - "Interval", - "Enum", - "Indexable", - "ARRAY", - "JSON", -] diff --git a/stubs/SQLAlchemy/sqlalchemy/util/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/util/__init__.pyi deleted file mode 100644 index bcca0252501d..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/__init__.pyi +++ /dev/null @@ -1,173 +0,0 @@ -import asyncio as asyncio -import pickle as pickle -import threading as threading -from abc import ABC as ABC -from builtins import callable as callable, next as next -from collections import defaultdict as defaultdict, namedtuple as namedtuple # noqa: Y024 # Actual import -from contextlib import contextmanager as contextmanager -from datetime import timezone as timezone -from functools import partial as partial, reduce as reduce, update_wrapper as update_wrapper -from io import StringIO as StringIO -from itertools import zip_longest as zip_longest -from typing import TYPE_CHECKING as TYPE_CHECKING -from urllib.parse import parse_qsl as parse_qsl, quote_plus as quote_plus, unquote as unquote, unquote_plus as unquote_plus - -from ._collections import ( - EMPTY_DICT as EMPTY_DICT, - EMPTY_SET as EMPTY_SET, - FacadeDict as FacadeDict, - IdentitySet as IdentitySet, - ImmutableContainer as ImmutableContainer, - ImmutableProperties as ImmutableProperties, - LRUCache as LRUCache, - OrderedDict as OrderedDict, - OrderedIdentitySet as OrderedIdentitySet, - OrderedProperties as OrderedProperties, - OrderedSet as OrderedSet, - PopulateDict as PopulateDict, - Properties as Properties, - ScopedRegistry as ScopedRegistry, - ThreadLocalRegistry as ThreadLocalRegistry, - UniqueAppender as UniqueAppender, - WeakPopulateDict as WeakPopulateDict, - WeakSequence as WeakSequence, - coerce_generator_arg as coerce_generator_arg, - coerce_to_immutabledict as coerce_to_immutabledict, - collections_abc as collections_abc, - column_dict as column_dict, - column_set as column_set, - flatten_iterator as flatten_iterator, - has_dupes as has_dupes, - has_intersection as has_intersection, - immutabledict as immutabledict, - ordered_column_set as ordered_column_set, - sort_dictionary as sort_dictionary, - to_column_set as to_column_set, - to_list as to_list, - to_set as to_set, - unique_list as unique_list, - update_copy as update_copy, -) -from ._preloaded import preload_module as preload_module, preloaded as preloaded -from .compat import ( - arm as arm, - b as b, - b64decode as b64decode, - b64encode as b64encode, - binary_type as binary_type, - binary_types as binary_types, - byte_buffer as byte_buffer, - cmp as cmp, - cpython as cpython, - dataclass_fields as dataclass_fields, - decode_backslashreplace as decode_backslashreplace, - dottedgetter as dottedgetter, - has_refcount_gc as has_refcount_gc, - inspect_getfullargspec as inspect_getfullargspec, - int_types as int_types, - is64bit as is64bit, - iterbytes as iterbytes, - itertools_filter as itertools_filter, - itertools_filterfalse as itertools_filterfalse, - local_dataclass_fields as local_dataclass_fields, - nullcontext as nullcontext, - osx as osx, - perf_counter as perf_counter, - print_ as print_, - py2k as py2k, - py3k as py3k, - py37 as py37, - py38 as py38, - py39 as py39, - py310 as py310, - py311 as py311, - py312 as py312, - pypy as pypy, - quote as quote, - raise_ as raise_, - raise_from_cause as raise_from_cause, - reraise as reraise, - string_types as string_types, - text_type as text_type, - u as u, - ue as ue, - win32 as win32, - with_metaclass as with_metaclass, -) -from .concurrency import ( - await_fallback as await_fallback, - await_only as await_only, - greenlet_spawn as greenlet_spawn, - is_exit_exception as is_exit_exception, -) -from .deprecations import ( - SQLALCHEMY_WARN_20 as SQLALCHEMY_WARN_20, - deprecated as deprecated, - deprecated_20 as deprecated_20, - deprecated_20_cls as deprecated_20_cls, - deprecated_cls as deprecated_cls, - deprecated_params as deprecated_params, - inject_docstring_text as inject_docstring_text, - moved_20 as moved_20, - warn_deprecated as warn_deprecated, - warn_deprecated_20 as warn_deprecated_20, -) -from .langhelpers import ( - EnsureKWArgType as EnsureKWArgType, - HasMemoized as HasMemoized, - MemoizedSlots as MemoizedSlots, - NoneType as NoneType, - PluginLoader as PluginLoader, - add_parameter_text as add_parameter_text, - as_interface as as_interface, - asbool as asbool, - asint as asint, - assert_arg_type as assert_arg_type, - attrsetter as attrsetter, - bool_or_str as bool_or_str, - chop_traceback as chop_traceback, - class_hierarchy as class_hierarchy, - classproperty as classproperty, - clsname_as_plain_name as clsname_as_plain_name, - coerce_kw_type as coerce_kw_type, - constructor_copy as constructor_copy, - constructor_key as constructor_key, - counter as counter, - create_proxy_methods as create_proxy_methods, - decode_slice as decode_slice, - decorator as decorator, - dictlike_iteritems as dictlike_iteritems, - duck_type_collection as duck_type_collection, - ellipses_string as ellipses_string, - format_argspec_init as format_argspec_init, - format_argspec_plus as format_argspec_plus, - generic_repr as generic_repr, - get_callable_argspec as get_callable_argspec, - get_cls_kwargs as get_cls_kwargs, - get_func_kwargs as get_func_kwargs, - getargspec_init as getargspec_init, - has_compiled_ext as has_compiled_ext, - hybridmethod as hybridmethod, - hybridproperty as hybridproperty, - iterate_attributes as iterate_attributes, - map_bits as map_bits, - md5_hex as md5_hex, - memoized_instancemethod as memoized_instancemethod, - memoized_property as memoized_property, - method_is_overridden as method_is_overridden, - methods_equivalent as methods_equivalent, - monkeypatch_proxied_specials as monkeypatch_proxied_specials, - only_once as only_once, - portable_instancemethod as portable_instancemethod, - quoted_token_parser as quoted_token_parser, - safe_reraise as safe_reraise, - set_creation_order as set_creation_order, - string_or_unprintable as string_or_unprintable, - symbol as symbol, - unbound_method_to_callable as unbound_method_to_callable, - walk_subclasses as walk_subclasses, - warn as warn, - warn_exception as warn_exception, - warn_limited as warn_limited, - wrap_callable as wrap_callable, -) diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi deleted file mode 100644 index e487b34a63f8..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi +++ /dev/null @@ -1,219 +0,0 @@ -import collections.abc -from _typeshed import Incomplete, SupportsKeysAndGetItem, Unused -from collections.abc import Callable, Iterable, Iterator, Mapping -from typing import Any, Generic, NoReturn, TypeVar, overload -from typing_extensions import Self - -from ..cimmutabledict import immutabledict as immutabledict - -_KT = TypeVar("_KT") -_VT = TypeVar("_VT") -_S = TypeVar("_S") -_T = TypeVar("_T") - -collections_abc = collections.abc - -EMPTY_SET: frozenset[Any] - -class ImmutableContainer: - def __delitem__(self, *arg: Unused, **kw: Unused) -> NoReturn: ... - def __setitem__(self, *arg: Unused, **kw: Unused) -> NoReturn: ... - def __setattr__(self, *arg: Unused, **kw: Unused) -> NoReturn: ... - -@overload -def coerce_to_immutabledict(d: None) -> immutabledict[Any, Any]: ... -@overload -def coerce_to_immutabledict(d: Mapping[_KT, _VT]) -> immutabledict[_KT, _VT]: ... - -EMPTY_DICT: immutabledict[Any, Any] - -class FacadeDict(ImmutableContainer, dict[Any, Any]): - clear: Any - pop: Any - popitem: Any - setdefault: Any - update: Any - def __new__(cls, *args): ... - def copy(self) -> None: ... # type: ignore[override] - def __reduce__(self): ... - -class Properties(Generic[_T]): - def __init__(self, data: dict[str, _T]) -> None: ... - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __dir__(self) -> list[str]: ... - def __add__(self, other: Iterable[_S]) -> list[_S | _T]: ... - def __setitem__(self, key: str, obj: _T) -> None: ... - def __getitem__(self, key: str) -> _T: ... - def __delitem__(self, key: str) -> None: ... - def __setattr__(self, key: str, obj: _T) -> None: ... - def __getattr__(self, key: str) -> _T: ... - def __contains__(self, key: str) -> bool: ... - def as_immutable(self) -> ImmutableProperties[_T]: ... - def update(self, value: Iterable[tuple[str, _T]] | SupportsKeysAndGetItem[str, _T]) -> None: ... - @overload - def get(self, key: str) -> _T | None: ... - @overload - def get(self, key: str, default: _S) -> _T | _S: ... - def keys(self) -> list[str]: ... - def values(self) -> list[_T]: ... - def items(self) -> list[tuple[str, _T]]: ... - def has_key(self, key: str) -> bool: ... - def clear(self) -> None: ... - -class OrderedProperties(Properties[_T], Generic[_T]): - def __init__(self) -> None: ... - -class ImmutableProperties(ImmutableContainer, Properties[_T], Generic[_T]): ... - -OrderedDict = dict - -def sort_dictionary(d, key: Incomplete | None = None): ... - -class OrderedSet(set[_T], Generic[_T]): - @overload - def __init__(self, d: None = None) -> None: ... - @overload - def __init__(self, d: Iterable[_T]) -> None: ... - def add(self, element: _T) -> None: ... - def remove(self, element: _T) -> None: ... - def insert(self, pos: int, element: _T) -> None: ... - def discard(self, element: _T) -> None: ... - def clear(self) -> None: ... - def __getitem__(self, key: int) -> _T: ... - def __iter__(self) -> Iterator[_T]: ... - def __add__(self, other: Iterable[_S]) -> OrderedSet[_S | _T]: ... - def update(self, iterable: Iterable[_T]) -> Self: ... # type: ignore[override] - __ior__ = update # type: ignore[assignment] - def union(self, other: Iterable[_S]) -> OrderedSet[_S | _T]: ... # type: ignore[override] - __or__ = union # type: ignore[assignment] # pyright: ignore[reportGeneralTypeIssues] - def intersection(self, other: Iterable[Any]) -> Self: ... # type: ignore[override] - __and__ = intersection # type: ignore[assignment] - def symmetric_difference(self, other: Iterable[_S]) -> OrderedSet[_S | _T]: ... - __xor__ = symmetric_difference # type: ignore[assignment] # pyright: ignore[reportGeneralTypeIssues] - def difference(self, other: Iterable[Any]) -> Self: ... # type: ignore[override] - __sub__ = difference # type: ignore[assignment] - def intersection_update(self, other: Iterable[Any]) -> Self: ... # type: ignore[override] - __iand__ = intersection_update # type: ignore[assignment] - def symmetric_difference_update(self, other: Iterable[_T]) -> Self: ... # type: ignore[override] - __ixor__ = symmetric_difference_update # type: ignore[assignment] - def difference_update(self, other: Iterable[Any]) -> Self: ... # type: ignore[override] - __isub__ = difference_update # type: ignore[assignment] - -class IdentitySet: - def __init__(self, iterable: Incomplete | None = None) -> None: ... - def add(self, value) -> None: ... - def __contains__(self, value): ... - def remove(self, value) -> None: ... - def discard(self, value) -> None: ... - def pop(self): ... - def clear(self) -> None: ... - def __cmp__(self, other) -> None: ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def issubset(self, iterable): ... - def __le__(self, other): ... - def __lt__(self, other): ... - def issuperset(self, iterable): ... - def __ge__(self, other): ... - def __gt__(self, other): ... - def union(self, iterable): ... - def __or__(self, other): ... - def update(self, iterable) -> None: ... - def __ior__(self, other): ... - def difference(self, iterable): ... - def __sub__(self, other): ... - def difference_update(self, iterable) -> None: ... - def __isub__(self, other): ... - def intersection(self, iterable): ... - def __and__(self, other): ... - def intersection_update(self, iterable) -> None: ... - def __iand__(self, other): ... - def symmetric_difference(self, iterable): ... - def __xor__(self, other): ... - def symmetric_difference_update(self, iterable) -> None: ... - def __ixor__(self, other): ... - def copy(self): ... - __copy__: Any - def __len__(self) -> int: ... - def __iter__(self): ... - def __hash__(self) -> int: ... - -class WeakSequence: - def __init__(self, _WeakSequence__elements: Iterable[Incomplete] = ()) -> None: ... - def append(self, item) -> None: ... - def __len__(self) -> int: ... - def __iter__(self): ... - def __getitem__(self, index): ... - -class OrderedIdentitySet(IdentitySet): - def __init__(self, iterable: Incomplete | None = None) -> None: ... - -class PopulateDict(dict[Any, Any]): - creator: Any - def __init__(self, creator) -> None: ... - def __missing__(self, key): ... - -class WeakPopulateDict(dict[Any, Any]): - creator: Any - weakself: Any - def __init__(self, creator_method) -> None: ... - def __missing__(self, key): ... - -column_set = set -column_dict = dict -# Ignore Y026, this isn't a type alias. -# We have to do `ordered_column_set = OrderedSet[_T] -# instead of `ordered_column_set = OrderedSet`, -# or pyright complains -ordered_column_set = OrderedSet[_T] # noqa: Y026 - -def unique_list(seq: Iterable[_T], hashfunc: Callable[[_T], Any] | None = None) -> list[_T]: ... - -class UniqueAppender: - data: Any - def __init__(self, data, via: Incomplete | None = None) -> None: ... - def append(self, item) -> None: ... - def __iter__(self): ... - -def coerce_generator_arg(arg): ... -def to_list(x, default: Incomplete | None = None): ... -def has_intersection(set_, iterable): ... -def to_set(x): ... -def to_column_set(x): ... -def update_copy(d, _new: Incomplete | None = None, **kw): ... -def flatten_iterator(x) -> None: ... - -class LRUCache(dict[Any, Any]): - capacity: Any - threshold: Any - size_alert: Any - def __init__(self, capacity: int = 100, threshold: float = 0.5, size_alert: Incomplete | None = None) -> None: ... - def get(self, key, default: Incomplete | None = None): ... - def __getitem__(self, key): ... - def values(self): ... - def setdefault(self, key, value): ... - def __setitem__(self, key, value) -> None: ... - @property - def size_threshold(self): ... - -class ScopedRegistry: - createfunc: Any - scopefunc: Any - registry: Any - def __init__(self, createfunc, scopefunc) -> None: ... - def __call__(self): ... - def has(self): ... - def set(self, obj) -> None: ... - def clear(self) -> None: ... - -class ThreadLocalRegistry(ScopedRegistry): - createfunc: Any - registry: Any - def __init__(self, createfunc) -> None: ... - def __call__(self): ... - def has(self): ... - def set(self, obj) -> None: ... - def clear(self) -> None: ... - -def has_dupes(sequence, target): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_compat_py3k.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_compat_py3k.pyi deleted file mode 100644 index 7f453b9db5a1..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/_compat_py3k.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from types import TracebackType -from typing import Any - -class _AsyncGeneratorContextManager: - gen: Any - __doc__: Any - def __init__(self, func, args, kwds) -> None: ... - async def __aenter__(self): ... - async def __aexit__( - self, typ: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> bool | None: ... - -def asynccontextmanager(func): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi deleted file mode 100644 index 4a8d24e50ee1..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio as asyncio -from _typeshed import Unused -from collections.abc import Callable, Coroutine -from typing import Any - -from .langhelpers import memoized_property - -def is_exit_exception(e): ... -def await_only(awaitable: Coroutine[Any, Any, Any]) -> Any: ... -def await_fallback(awaitable: Coroutine[Any, Any, Any]) -> Any: ... -async def greenlet_spawn(fn: Callable[..., Any], *args, _require_await: bool = False, **kwargs) -> Any: ... - -class AsyncAdaptedLock: - @memoized_property - def mutex(self): ... - def __enter__(self): ... - def __exit__(self, *arg: Unused, **kw: Unused) -> None: ... - -def get_event_loop(): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi deleted file mode 100644 index f1e73ecf3a88..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Any - -class _ModuleRegistry: - module_registry: Any - prefix: Any - def __init__(self, prefix: str = "sqlalchemy.") -> None: ... - def preload_module(self, *deps): ... - def import_prefix(self, path) -> None: ... - -preloaded: Any -preload_module: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi b/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi deleted file mode 100644 index 02ce27adc2f5..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi +++ /dev/null @@ -1,112 +0,0 @@ -import itertools -import operator -import pickle as pickle -import sys -import threading as threading -from _typeshed import Incomplete, Unused -from abc import ABC as ABC -from builtins import callable as callable, next as next -from collections import namedtuple as namedtuple # noqa: Y024 # Actual import -from contextlib import contextmanager as contextmanager -from datetime import timezone as timezone -from functools import reduce as reduce -from io import BytesIO, StringIO as StringIO -from itertools import zip_longest as zip_longest -from time import perf_counter as perf_counter -from typing import TYPE_CHECKING as TYPE_CHECKING, Any, NamedTuple -from typing_extensions import Final -from urllib.parse import ( - parse_qsl as parse_qsl, - quote as quote, - quote_plus as quote_plus, - unquote as unquote, - unquote_plus as unquote_plus, -) - -byte_buffer = BytesIO - -py312: bool -py311: bool -py310: bool -py39: bool -py38: bool -py37: bool -py3k: Final = True -py2k: Final = False -pypy: bool -cpython: bool -if sys.platform == "win32": - win32: Final = True -else: - win32: Final = False -if sys.platform == "darwin": - osx: Final = True -else: - osx: Final = False -arm: bool -is64bit: bool -has_refcount_gc: bool -dottedgetter = operator.attrgetter - -class FullArgSpec(NamedTuple): - args: Any - varargs: Any - varkw: Any - defaults: Any - kwonlyargs: Any - kwonlydefaults: Any - annotations: Any - -class nullcontext: - enter_result: Any - def __init__(self, enter_result: Incomplete | None = None) -> None: ... - def __enter__(self): ... - def __exit__(self, *excinfo: Unused) -> None: ... - -def inspect_getfullargspec(func): ... -def importlib_metadata_get(group): ... - -string_types: tuple[type, ...] -binary_types: tuple[type, ...] -binary_type = bytes -text_type = str -int_types: tuple[type, ...] -iterbytes = iter -long_type = int -itertools_filterfalse = itertools.filterfalse -itertools_filter = filter -itertools_imap = map -exec_: Any -import_: Any -print_: Any - -def b(s): ... -def b64decode(x): ... -def b64encode(x): ... -def decode_backslashreplace(text, encoding): ... -def cmp(a, b): ... -def raise_( - exception, with_traceback: Incomplete | None = None, replace_context: Incomplete | None = None, from_: bool = False -) -> None: ... -def u(s): ... -def ue(s): ... -def inspect_formatargspec( - args, - varargs: Incomplete | None = None, - varkw: Incomplete | None = None, - defaults: Incomplete | None = None, - kwonlyargs=(), - kwonlydefaults={}, - annotations={}, - formatarg=..., - formatvarargs=..., - formatvarkw=..., - formatvalue=..., - formatreturns=..., - formatannotation=..., -): ... -def dataclass_fields(cls): ... -def local_dataclass_fields(cls): ... -def raise_from_cause(exception, exc_info: Incomplete | None = None) -> None: ... -def reraise(tp, value, tb: Incomplete | None = None, cause: Incomplete | None = None) -> None: ... -def with_metaclass(meta, *bases, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/concurrency.pyi b/stubs/SQLAlchemy/sqlalchemy/util/concurrency.pyi deleted file mode 100644 index dce9ae586b2a..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/concurrency.pyi +++ /dev/null @@ -1,13 +0,0 @@ -import asyncio as asyncio - -from ._compat_py3k import asynccontextmanager as asynccontextmanager -from ._concurrency_py3k import ( - AsyncAdaptedLock as AsyncAdaptedLock, - await_fallback as await_fallback, - await_only as await_only, - greenlet_spawn as greenlet_spawn, - is_exit_exception as is_exit_exception, -) - -have_greenlet: bool -greenlet_error: str | None diff --git a/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi b/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi deleted file mode 100644 index e816883e2c34..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi +++ /dev/null @@ -1,28 +0,0 @@ -from _typeshed import Incomplete - -from .langhelpers import ( - decorator as decorator, - inject_docstring_text as inject_docstring_text, - inject_param_text as inject_param_text, -) - -SQLALCHEMY_WARN_20: bool -SILENCE_UBER_WARNING: bool - -def warn_deprecated(msg, version, stacklevel: int = 3, code: Incomplete | None = None) -> None: ... -def warn_deprecated_limited(msg, args, version, stacklevel: int = 3, code: Incomplete | None = None) -> None: ... -def warn_deprecated_20(msg, stacklevel: int = 3, code: Incomplete | None = None) -> None: ... -def deprecated_cls(version, message, constructor: str = "__init__"): ... -def deprecated_20_cls( - clsname, alternative: Incomplete | None = None, constructor: str = "__init__", becomes_legacy: bool = False -): ... -def deprecated( - version, - message: Incomplete | None = None, - add_deprecation_to_docstring: bool = True, - warning: Incomplete | None = None, - enable_warnings: bool = True, -): ... -def moved_20(message, **kw): ... -def deprecated_20(api_name, alternative: Incomplete | None = None, becomes_legacy: bool = False, **kw): ... -def deprecated_params(**specs): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi b/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi deleted file mode 100644 index a18aa1a09aa1..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi +++ /dev/null @@ -1,176 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from types import TracebackType -from typing import Any, Generic, TypeVar, overload -from typing_extensions import Self - -from . import compat - -_R = TypeVar("_R") - -def md5_hex(x): ... - -class safe_reraise: - warn_only: Any - def __init__(self, warn_only: bool = False) -> None: ... - def __enter__(self) -> None: ... - def __exit__( - self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - -def walk_subclasses(cls) -> None: ... -def string_or_unprintable(element): ... -def clsname_as_plain_name(cls): ... -def method_is_overridden(instance_or_cls, against_method): ... -def decode_slice(slc): ... -def map_bits(fn, n) -> None: ... -def decorator(target): ... -def public_factory(target, location, class_location: Incomplete | None = None): ... - -class PluginLoader: - group: Any - impls: Any - auto_fn: Any - def __init__(self, group, auto_fn: Incomplete | None = None) -> None: ... - def clear(self) -> None: ... - def load(self, name): ... - def register(self, name, modulepath, objname) -> None: ... - -def get_cls_kwargs(cls, _set: Incomplete | None = None): ... -def get_func_kwargs(func): ... -def get_callable_argspec(fn, no_self: bool = False, _is_init: bool = False): ... -def format_argspec_plus(fn, grouped: bool = True): ... -def format_argspec_init(method, grouped: bool = True): ... -def create_proxy_methods( - target_cls, target_cls_sphinx_name, proxy_cls_sphinx_name, classmethods=(), methods=(), attributes=() -): ... -def getargspec_init(method): ... -def unbound_method_to_callable(func_or_cls): ... -def generic_repr(obj, additional_kw=(), to_inspect: Incomplete | None = None, omit_kwarg=()): ... - -class portable_instancemethod: - target: Any - name: Any - kwargs: Any - def __init__(self, meth, kwargs=()) -> None: ... - def __call__(self, *arg, **kw): ... - -def class_hierarchy(cls): ... -def iterate_attributes(cls) -> None: ... -def monkeypatch_proxied_specials( - into_cls, - from_cls, - skip: Incomplete | None = None, - only: Incomplete | None = None, - name: str = "self.proxy", - from_instance: Incomplete | None = None, -) -> None: ... -def methods_equivalent(meth1, meth2): ... -def as_interface(obj, cls: Incomplete | None = None, methods: Incomplete | None = None, required: Incomplete | None = None): ... - -class memoized_property(Generic[_R]): - fget: Callable[..., _R] - __doc__: str - __name__: str - def __init__(self, fget: Callable[..., _R], doc: str | None = None) -> None: ... - @overload - def __get__(self, obj: None, cls: Unused) -> Self: ... - @overload - def __get__(self, obj: object, cls: Unused) -> _R: ... - @classmethod - def reset(cls, obj: object, name: str) -> None: ... - -def memoized_instancemethod(fn): ... - -class HasMemoized: - class memoized_attribute(Generic[_R]): - fget: Callable[..., _R] - __doc__: str - __name__: str - def __init__(self, fget: Callable[..., _R], doc: str | None = None) -> None: ... - @overload - def __get__(self, obj: None, cls: Unused) -> Self: ... - @overload - def __get__(self, obj: object, cls: Unused) -> _R: ... - - @classmethod - def memoized_instancemethod(cls, fn): ... - -class MemoizedSlots: - def __getattr__(self, key: str): ... - -def asbool(obj): ... -def bool_or_str(*text): ... -def asint(value): ... -def coerce_kw_type(kw, key, type_, flexi_bool: bool = True, dest: Incomplete | None = None) -> None: ... -def constructor_key(obj, cls): ... -def constructor_copy(obj, cls, *args, **kw): ... -def counter(): ... -def duck_type_collection(specimen, default: Incomplete | None = None): ... -def assert_arg_type(arg, argtype, name): ... -def dictlike_iteritems(dictlike): ... - -class classproperty(property): - __doc__: Any - def __init__(self, fget, *arg, **kw) -> None: ... - def __get__(self, self_, cls): ... - -class hybridproperty(Generic[_R]): - func: Callable[..., _R] - clslevel: Callable[..., _R] - def __init__(self, func: Callable[..., _R]) -> None: ... - @overload - def __get__(self, instance: None, owner: Any) -> _R: ... - @overload - def __get__(self, instance: object, owner: object) -> _R: ... - def classlevel(self, func: Callable[..., _R]) -> Self: ... - -class hybridmethod: - func: Any - clslevel: Any - def __init__(self, func) -> None: ... - def __get__(self, instance, owner): ... - def classlevel(self, func): ... - -class _symbol(int): - def __new__( # noqa: Y034 # Explicitly instantiates _symbol - self, name, doc: Incomplete | None = None, canonical: Incomplete | None = None - ) -> _symbol: ... - def __reduce__(self): ... - -class symbol: - symbols: Any - def __new__( # type: ignore[misc] # Explicitly instantiates _symbol - cls, name, doc: Incomplete | None = None, canonical: Incomplete | None = None - ) -> _symbol: ... - @classmethod - def parse_user_argument(cls, arg, choices, name, resolve_symbol_names: bool = False): ... - -def set_creation_order(instance) -> None: ... -def warn_exception(func, *args, **kwargs): ... -def ellipses_string(value, len_: int = 25): ... - -class _hash_limit_string(compat.text_type): - def __new__(cls, value, num, args): ... - def __hash__(self) -> int: ... - def __eq__(self, other): ... - -def warn(msg, code: Incomplete | None = None) -> None: ... -def warn_limited(msg, args) -> None: ... -def only_once(fn, retry_on_exception): ... -def chop_traceback(tb, exclude_prefix=..., exclude_suffix=...): ... - -NoneType: Any - -def attrsetter(attrname): ... - -class EnsureKWArgType(type): - def __init__(cls, clsname, bases, clsdict) -> None: ... - -def wrap_callable(wrapper, fn): ... -def quoted_token_parser(value): ... -def add_parameter_text(params, text): ... -def inject_docstring_text(doctext, injecttext, pos): ... -def inject_param_text(doctext, inject_params): ... -def repr_tuple_names(names): ... -def has_compiled_ext(): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi b/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi deleted file mode 100644 index 852018369726..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class Empty(Exception): ... -class Full(Exception): ... - -class Queue: - mutex: Any - not_empty: Any - not_full: Any - use_lifo: Any - def __init__(self, maxsize: int = 0, use_lifo: bool = False) -> None: ... - def qsize(self): ... - def empty(self): ... - def full(self): ... - def put(self, item, block: bool = True, timeout: Incomplete | None = None) -> None: ... - def put_nowait(self, item): ... - def get(self, block: bool = True, timeout: Incomplete | None = None): ... - def get_nowait(self): ... - -class AsyncAdaptedQueue: - await_: Any - use_lifo: Any - maxsize: Any - def __init__(self, maxsize: int = 0, use_lifo: bool = False) -> None: ... - def empty(self): ... - def full(self): ... - def qsize(self): ... - def put_nowait(self, item): ... - def put(self, item, block: bool = True, timeout: Incomplete | None = None): ... - def get_nowait(self): ... - def get(self, block: bool = True, timeout: Incomplete | None = None): ... - -class FallbackAsyncAdaptedQueue(AsyncAdaptedQueue): - await_: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi b/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi deleted file mode 100644 index 7f54e1a0574c..000000000000 --- a/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi +++ /dev/null @@ -1,3 +0,0 @@ -def sort_as_subsets(tuples, allitems) -> None: ... -def sort(tuples, allitems, deterministic_order: bool = True) -> None: ... -def find_cycles(tuples, allitems): ... diff --git a/tests/pytype_exclude_list.txt b/tests/pytype_exclude_list.txt index f5f6c2f185b5..a9cf7f1340c1 100644 --- a/tests/pytype_exclude_list.txt +++ b/tests/pytype_exclude_list.txt @@ -15,5 +15,3 @@ stubs/pika/pika/adapters/twisted_connection.pyi # pytype.pytd.visitors.ContainerError: Conflicting values for TypeVar stubs/openpyxl/openpyxl/descriptors/nested.pyi -stubs/SQLAlchemy/sqlalchemy/engine/row.pyi -stubs/SQLAlchemy/sqlalchemy/sql/annotation.pyi From 2d27026ea83a0bdf747c7bc7b3cc8ec907f63952 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 30 Jun 2023 16:22:05 +0300 Subject: [PATCH 2/5] Also remove `Flask-SQLAlchemy --- pyrightconfig.stricter.json | 1 - .../@tests/stubtest_allowlist.txt | 2 - stubs/Flask-SQLAlchemy/METADATA.toml | 7 -- .../flask_sqlalchemy/__init__.pyi | 97 ------------------- .../flask_sqlalchemy/model.pyi | 25 ----- .../flask_sqlalchemy/utils.pyi | 3 - 6 files changed, 135 deletions(-) delete mode 100644 stubs/Flask-SQLAlchemy/@tests/stubtest_allowlist.txt delete mode 100644 stubs/Flask-SQLAlchemy/METADATA.toml delete mode 100644 stubs/Flask-SQLAlchemy/flask_sqlalchemy/__init__.pyi delete mode 100644 stubs/Flask-SQLAlchemy/flask_sqlalchemy/model.pyi delete mode 100644 stubs/Flask-SQLAlchemy/flask_sqlalchemy/utils.pyi diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 6d477cf6dd33..bf45d7dbe4c5 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -35,7 +35,6 @@ "stubs/dateparser", "stubs/docutils", "stubs/Flask-Migrate", - "stubs/Flask-SQLAlchemy", "stubs/fpdf2", "stubs/html5lib", "stubs/httplib2", diff --git a/stubs/Flask-SQLAlchemy/@tests/stubtest_allowlist.txt b/stubs/Flask-SQLAlchemy/@tests/stubtest_allowlist.txt deleted file mode 100644 index 2187a2368259..000000000000 --- a/stubs/Flask-SQLAlchemy/@tests/stubtest_allowlist.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Needed due dynamic attribute generation -flask_sqlalchemy.SQLAlchemy.__getattr__ diff --git a/stubs/Flask-SQLAlchemy/METADATA.toml b/stubs/Flask-SQLAlchemy/METADATA.toml deleted file mode 100644 index 7c295e685970..000000000000 --- a/stubs/Flask-SQLAlchemy/METADATA.toml +++ /dev/null @@ -1,7 +0,0 @@ -version = "2.5.*" -requires = ["types-SQLAlchemy"] -obsolete_since = "3.0.1" # Released on 2022-10-11 -partial_stub = true - -[tool.stubtest] -ignore_missing_stub = true diff --git a/stubs/Flask-SQLAlchemy/flask_sqlalchemy/__init__.pyi b/stubs/Flask-SQLAlchemy/flask_sqlalchemy/__init__.pyi deleted file mode 100644 index 3b92518bde99..000000000000 --- a/stubs/Flask-SQLAlchemy/flask_sqlalchemy/__init__.pyi +++ /dev/null @@ -1,97 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Generator -from typing import Any, Generic, TypeVar - -from sqlalchemy.orm import scoped_session -from sqlalchemy.orm.query import Query -from sqlalchemy.orm.session import Session - -from . import utils as utils -from .model import DefaultMeta as DefaultMeta, Model as Model - -models_committed: Any -before_models_committed: Any - -class SignallingSession(Session): - app: Any - def __init__(self, db, autocommit: bool = False, autoflush: bool = True, **options) -> None: ... - def get_bind(self, mapper: Incomplete | None = None, clause: Incomplete | None = None): ... # type: ignore[override] - -def get_debug_queries(): ... - -_T = TypeVar("_T") - -class BaseQuery(Query[_T]): - def get_or_404(self, ident, description: Incomplete | None = None): ... - def first_or_404(self, description: Incomplete | None = None): ... - def paginate( - self, - page: Incomplete | None = None, - per_page: Incomplete | None = None, - error_out: bool = True, - max_per_page: Incomplete | None = None, - ) -> Pagination[_T]: ... - -class Pagination(Generic[_T]): - query: BaseQuery[_T] | None - page: int - per_page: int - total: int | None - items: Any - def __init__(self, query: BaseQuery[_T] | None, page: int, per_page: int, total: int | None, items) -> None: ... - @property - def pages(self) -> int: ... - def prev(self, error_out: bool = False) -> Pagination[_T]: ... - @property - def prev_num(self) -> int | None: ... - @property - def has_prev(self) -> bool: ... - def next(self, error_out: bool = False) -> Pagination[_T]: ... - @property - def has_next(self) -> bool: ... - @property - def next_num(self) -> int | None: ... - def iter_pages( - self, left_edge: int = 2, left_current: int = 2, right_current: int = 5, right_edge: int = 2 - ) -> Generator[int | None, None, None]: ... - -def get_state(app): ... - -class SQLAlchemy: - Query: Any - use_native_unicode: Any - session: scoped_session - Model: Model - app: Any - def __init__( - self, - app: Incomplete | None = None, - use_native_unicode: bool = True, - session_options: Incomplete | None = None, - metadata: Incomplete | None = None, - query_class=..., - model_class=..., - engine_options: Incomplete | None = None, - ) -> None: ... - @property - def metadata(self): ... - def create_scoped_session(self, options: Incomplete | None = None): ... - def create_session(self, options): ... - def make_declarative_base(self, model, metadata: Incomplete | None = None): ... - def init_app(self, app): ... - def apply_pool_defaults(self, app, options): ... - def apply_driver_hacks(self, app, sa_url, options): ... - @property - def engine(self): ... - def make_connector(self, app: Incomplete | None = None, bind: Incomplete | None = None): ... - def get_engine(self, app: Incomplete | None = None, bind: Incomplete | None = None): ... - def create_engine(self, sa_url, engine_opts): ... - def get_app(self, reference_app: Incomplete | None = None): ... - def get_tables_for_bind(self, bind: Incomplete | None = None): ... - def get_binds(self, app: Incomplete | None = None): ... - def create_all(self, bind: str = "__all__", app: Incomplete | None = None) -> None: ... - def drop_all(self, bind: str = "__all__", app: Incomplete | None = None) -> None: ... - def reflect(self, bind: str = "__all__", app: Incomplete | None = None) -> None: ... - def __getattr__(self, name: str) -> Any: ... # exposes dynamically classes of SQLAlchemy - -class FSADeprecationWarning(DeprecationWarning): ... diff --git a/stubs/Flask-SQLAlchemy/flask_sqlalchemy/model.pyi b/stubs/Flask-SQLAlchemy/flask_sqlalchemy/model.pyi deleted file mode 100644 index f1780c09082f..000000000000 --- a/stubs/Flask-SQLAlchemy/flask_sqlalchemy/model.pyi +++ /dev/null @@ -1,25 +0,0 @@ -from re import Pattern -from typing import Any - -from sqlalchemy import Table -from sqlalchemy.ext.declarative import DeclarativeMeta -from sqlalchemy.orm import Query - -def should_set_tablename(cls: type) -> bool: ... - -camelcase_re: Pattern[str] - -def camel_to_snake_case(name: str) -> str: ... - -class NameMetaMixin(type): - def __init__(cls, name: str, bases: tuple[type, ...], d: dict[str, Any]) -> None: ... - def __table_cls__(cls, *args, **kwargs) -> Table | None: ... - -class BindMetaMixin(type): - def __init__(cls, name: str, bases: tuple[type, ...], d: dict[str, Any]) -> None: ... - -class DefaultMeta(NameMetaMixin, BindMetaMixin, DeclarativeMeta): ... - -class Model: - query_class: type[Query[Any]] | None - query: Query[Any] | None diff --git a/stubs/Flask-SQLAlchemy/flask_sqlalchemy/utils.pyi b/stubs/Flask-SQLAlchemy/flask_sqlalchemy/utils.pyi deleted file mode 100644 index 190d72483895..000000000000 --- a/stubs/Flask-SQLAlchemy/flask_sqlalchemy/utils.pyi +++ /dev/null @@ -1,3 +0,0 @@ -def parse_version(v: str) -> tuple[int, int, int]: ... -def sqlalchemy_version(op: str, val: str) -> bool: ... -def engine_config_warning(config, version: str, deprecated_config_key: str, engine_option) -> None: ... From 6b3ab4f25b64647e580b4a9a899f52637a6152ed Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Fri, 30 Jun 2023 14:40:57 +0100 Subject: [PATCH 3/5] Change Flask-Migrate dependency --- stubs/Flask-Migrate/METADATA.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/Flask-Migrate/METADATA.toml b/stubs/Flask-Migrate/METADATA.toml index 7979b27a6409..7bbc03e4354d 100644 --- a/stubs/Flask-Migrate/METADATA.toml +++ b/stubs/Flask-Migrate/METADATA.toml @@ -1,6 +1,6 @@ version = "4.0.*" -# Requires a version of flask with a `py.typed` file -requires = ["Flask>=2.0.0", "types-Flask-SQLAlchemy"] +# Requires versions of flask and Flask-SQLAlchemy with `py.typed` files +requires = ["Flask>=2.0.0", "Flask-SQLAlchemy>=3.0.1"] partial_stub = true [tool.stubtest] From 5447d7b76f26b309a335081ebbca5a5d3e7d0e56 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 30 Jun 2023 22:08:20 +0100 Subject: [PATCH 4/5] A hunch --- stubs/Flask-Migrate/flask_migrate/__init__.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stubs/Flask-Migrate/flask_migrate/__init__.pyi b/stubs/Flask-Migrate/flask_migrate/__init__.pyi index 5f60a5080dbc..c9f8befa7989 100644 --- a/stubs/Flask-Migrate/flask_migrate/__init__.pyi +++ b/stubs/Flask-Migrate/flask_migrate/__init__.pyi @@ -4,7 +4,7 @@ from typing import Any, TypeVar from typing_extensions import ParamSpec, TypeAlias import flask -from flask_sqlalchemy import SQLAlchemy +import flask_sqlalchemy _T = TypeVar("_T") _P = ParamSpec("_P") @@ -20,13 +20,13 @@ class Config: # should inherit from alembic.config.Config which is not possible class Migrate: configure_callbacks: list[_ConfigureCallback] - db: SQLAlchemy | None + db: flask_sqlalchemy.SQLAlchemy | None directory: str alembic_ctx_kwargs: dict[str, Any] def __init__( self, app: flask.Flask | None = None, - db: SQLAlchemy | None = None, + db: flask_sqlalchemy.SQLAlchemy | None = None, directory: str = "migrations", command: str = "db", compare_type: bool = True, @@ -36,7 +36,7 @@ class Migrate: def init_app( self, app: flask.Flask, - db: SQLAlchemy | None = None, + db: flask_sqlalchemy.SQLAlchemy | None = None, directory: str | None = None, command: str | None = None, compare_type: bool | None = None, From b1cba20ecdf633f681d114034127ffd14ba810f3 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Fri, 30 Jun 2023 22:17:31 +0100 Subject: [PATCH 5/5] Revert "A hunch" This reverts commit 5447d7b76f26b309a335081ebbca5a5d3e7d0e56. --- stubs/Flask-Migrate/flask_migrate/__init__.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stubs/Flask-Migrate/flask_migrate/__init__.pyi b/stubs/Flask-Migrate/flask_migrate/__init__.pyi index c9f8befa7989..5f60a5080dbc 100644 --- a/stubs/Flask-Migrate/flask_migrate/__init__.pyi +++ b/stubs/Flask-Migrate/flask_migrate/__init__.pyi @@ -4,7 +4,7 @@ from typing import Any, TypeVar from typing_extensions import ParamSpec, TypeAlias import flask -import flask_sqlalchemy +from flask_sqlalchemy import SQLAlchemy _T = TypeVar("_T") _P = ParamSpec("_P") @@ -20,13 +20,13 @@ class Config: # should inherit from alembic.config.Config which is not possible class Migrate: configure_callbacks: list[_ConfigureCallback] - db: flask_sqlalchemy.SQLAlchemy | None + db: SQLAlchemy | None directory: str alembic_ctx_kwargs: dict[str, Any] def __init__( self, app: flask.Flask | None = None, - db: flask_sqlalchemy.SQLAlchemy | None = None, + db: SQLAlchemy | None = None, directory: str = "migrations", command: str = "db", compare_type: bool = True, @@ -36,7 +36,7 @@ class Migrate: def init_app( self, app: flask.Flask, - db: flask_sqlalchemy.SQLAlchemy | None = None, + db: SQLAlchemy | None = None, directory: str | None = None, command: str | None = None, compare_type: bool | None = None,