x6苒zbdZddlZddlmZddlmZGddeZGd d eZdS) zGlobal database feature support policy. Provides decorators to mark tests requiring specific feature support from the target database. External dialect test suites should subclass SuiteRequirements to provide specific inclusion/exclusions. N) exclusions)utilceZdZdS) RequirementsN)__name__ __module__ __qualname__/srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/sqlalchemy/testing/requirements.pyrrsDr rc eZdZedZedZedZedZedZedZ edZ edZ ed Z ed Z ed Zed Zed ZedZedZedZedZedZedZedZedZedZedZedZedZedZedZedZedZ edZ!edZ"ed Z#ed!Z$ed"Z%ed#Z&ed$Z'ed%Z(ed&Z)ed'Z*ed(Z+ed)Z,ed*Z-ed+Z.ed,Z/ed-Z0ed.Z1ed/Z2ed0Z3ed1Z4ed2Z5ed3Z6ed4Z7ed5Z8ed6Z9ed7Z:ed8Z;ed9Zed<Z?ed=Z@ed>ZAed?ZBed@ZCedAZDedBZEedCZFedDZGedEZHedFZIedGZJedHZKedIZLedJZMedKZNedLZOedMZPedNZQedOZRedPZSedQZTedRZUedSZVedTZWedUZXedVZYedWZZedXZ[edYZ\edZZ]ed[Z^ed\Z_d]Z`ed^Zaed_Zbed`ZcedaZdedbZeedcZfeddZgedeZhedfZiedgZjedhZkediZledjZmedkZnedlZoedmZpednZqedoZredpZsedqZtedrZuedsZvedtZweduZxedvZyedwZzedxZ{edyZ|edzZ}d{Z~ed|Zed}Zed~ZedZedZedZedZedZedZedZedZedZedZedZedZedZedZdZdZedZedZdZdZedZedZedZedZedZedZdS)SuiteRequirementsc(tjS)z/target platform can emit basic CreateTable DDL.ropenselfs r create_tablezSuiteRequirements.create_table   r c(tjS)z-target platform can emit basic DropTable DDL.rrs r drop_tablezSuiteRequirements.drop_table#rr c(tjS)z*Target database must support foreign keys.rrs r foreign_keyszSuiteRequirements.foreign_keys)rr c(tjS)zQtarget database must support ON UPDATE..CASCADE behavior in foreign keys.rrs ron_update_cascadez#SuiteRequirements.on_update_cascade/    r c(tjS)zWtarget database must *not* support ON UPDATE..CASCADE behavior in foreign keys.rclosedrs rnon_updating_cascadez&SuiteRequirements.non_updating_cascade6 """r c(tjSNr rs rdeferrable_fksz SuiteRequirements.deferrable_fks< """r c2tjfdS)Nc4jjp jjSr%)renabledr&rsrz?SuiteRequirements.on_update_or_deferrable_fks..FsD*2+"*r ronly_ifrs`ron_update_or_deferrable_fksz-SuiteRequirements.on_update_or_deferrable_fks@s. ! + + + +   r c(tjS)z;Target database must support self-referential foreign keys.rrs rself_referential_foreign_keysz/SuiteRequirements.self_referential_foreign_keysJrr c(tjS)z=Target database must support the DDL phrases for FOREIGN KEY.rrs rforeign_key_ddlz!SuiteRequirements.foreign_key_ddlPrr c(tjS)z3target database must support names for constraints.rrs rnamed_constraintsz#SuiteRequirements.named_constraintsVrr c(tjS)z(Target database must support subqueries.rrs r subquerieszSuiteRequirements.subqueries\rr c(tjS)zRtarget database can render OFFSET, or an equivalent, in a SELECT. rrs roffsetzSuiteRequirements.offsetb    r c(tjS)zWtarget database can render LIMIT and/or OFFSET using a bound parameter rrs rbound_limit_offsetz$SuiteRequirements.bound_limit_offsetjr9r c(tjS)ztarget database can render LIMIT and/or OFFSET with a complete SQL expression, such as one that uses the addition operator. parameter rrs rsql_expression_limit_offsetz-SuiteRequirements.sql_expression_limit_offsetr   r c(tjS)zTarget database must support parenthesized SELECT in UNION when LIMIT/OFFSET is specifically present. E.g. (SELECT ...) UNION (SELECT ..) This is known to fail on SQLite. rrs r/parens_in_union_contained_select_w_limit_offsetzASuiteRequirements.parens_in_union_contained_select_w_limit_offset{   r c(tjS)alTarget database must support parenthesized SELECT in UNION when OFFSET/LIMIT is specifically not present. E.g. (SELECT ... LIMIT ..) UNION (SELECT .. OFFSET ..) This is known to fail on SQLite. It also fails on Oracle because without LIMIT/OFFSET, there is currently no step that creates an additional subquery. rrs r0parens_in_union_contained_select_wo_limit_offsetzBSuiteRequirements.parens_in_union_contained_select_wo_limit_offsets   r c(tjS)z;Target database must support boolean expressions as columnsr rs rboolean_col_expressionsz)SuiteRequirements.boolean_col_expressionsr#r c(tjS)z5Target database allows boolean columns to store NULL.rrs rnullable_booleansz#SuiteRequirements.nullable_booleansrr c(tjS)z,Target backends that support nulls ordering.r rs r nullsorderingzSuiteRequirements.nullsorderingr#r c(tjS)ztarget database/driver supports bound parameters as column expressions without being in the context of a typed column. r rs rstandalone_bindsz"SuiteRequirements.standalone_binds  """r c(tjS)ztarget database/driver supports bound parameters with NULL in the WHERE clause, in situations where it has to be typed. rrs r!standalone_null_binds_whereclausez3SuiteRequirements.standalone_null_binds_whereclauser9r c(tjS)z5Target database must support INTERSECT or equivalent.r rs r intersectzSuiteRequirements.intersect """r c(tjS)z?Target database must support EXCEPT or equivalent (i.e. MINUS).r rs rexcept_zSuiteRequirements.except_rQr c(tjS)z.Target database must support window functions.r rs rwindow_functionsz"SuiteRequirements.window_functionsrQr c(tjS)zTarget database supports CTEsr rs rcteszSuiteRequirements.ctesr#r c(tjS)ztarget database supports CTES that ride on top of a normal UPDATE or DELETE statement which refers to the CTE in a correlated subquery. r rs rctes_with_update_deletez)SuiteRequirements.ctes_with_update_delete """r c(tjS)z}target database supports CTES which consist of INSERT, UPDATE or DELETE *within* the CTE, e.g. WITH x AS (UPDATE....)r rs r ctes_on_dmlzSuiteRequirements.ctes_on_dml  """r c(tjS)z~target platform generates new surrogate integer primary key values when insert() is executed, excluding the pk column.rrs rautoincrement_insertz&SuiteRequirements.autoincrement_insertrr c(tjS)a#target platform will allow cursor.fetchone() to proceed after a COMMIT. Typically this refers to an INSERT statement with RETURNING which is invoked within "autocommit". If the row can be returned after the autocommit, then this rule can be open. rrs rfetch_rows_post_commitz(SuiteRequirements.fetch_rows_post_commits   r c(tjS)ztarget platform supports SQL expressions in GROUP BY e.g. SELECT x + y AS somelabel FROM table GROUP BY x + y rrs rgroup_by_complex_expressionz-SuiteRequirements.group_by_complex_expressionrAr c.tjddS)Nc&|jjj Sr%)dbdialectsupports_sane_rowcountconfigs rr+z1SuiteRequirements.sane_rowcount..svy0GGr z&driver doesn't support 'sane' rowcountrskip_ifrs r sane_rowcountzSuiteRequirements.sane_rowcounts ! G G 4   r c.tjddS)Nc&|jjj Sr%)rfrgsupports_sane_multi_rowcountris rr+z7SuiteRequirements.sane_multi_rowcount..svy0MMr z;driver %(driver)s %(doesnt_support)s 'sane' multi row countrfails_ifrs rsane_multi_rowcountz%SuiteRequirements.sane_multi_rowcounts " M M I   r c.tjddS)Nc&|jjj Sr%)rfrg supports_sane_rowcount_returningris rr+z=SuiteRequirements.sane_rowcount_w_returning.. s !Br z;driver doesn't support 'sane' rowcount when returning is onrqrs rsane_rowcount_w_returningz+SuiteRequirements.sane_rowcount_w_returning s'"   J    r c.tjddS)zatarget platform supports INSERT with no values, i.e. INSERT DEFAULT VALUES or equivalent.cF|jjjp|jjjSr%)rfrgsupports_empty_insertsupports_default_valuesris rr+z1SuiteRequirements.empty_inserts..s!69,B9y 8r zempty inserts not supportedr,rs r empty_insertszSuiteRequirements.empty_insertss& ! 9 9 )   r c(tjS)z.target platform supports INSERT from a SELECT.rrs rinsert_from_selectz$SuiteRequirements.insert_from_selectrr c.tjddS)z#target platform supports RETURNING.c$|jjjSr%)rfrgimplicit_returningris rr+z-SuiteRequirements.returning..)s69,?r z)%(database)s %(does_support)s 'returning'r,rs r returningzSuiteRequirements.returning$s"! ? ? 7   r c(tjS)zZTarget platform supports the syntax "(x, y) IN ((x1, y1), (x2, y2), ...)" r rs rtuple_inzSuiteRequirements.tuple_in-rLr c|jS)z%Target platform tuple IN w/ empty set)rrs rtuple_in_w_emptyz"SuiteRequirements.tuple_in_w_empty5s }r c(tjS)zwtarget platform supports a SELECT statement that has the same name repeated more than once in the columns list.rrs r%duplicate_names_in_cursor_descriptionz7SuiteRequirements.duplicate_names_in_cursor_description:rr c.tjddS)z[Target database must have 'denormalized', i.e. UPPERCASE as case insensitive names.c&|jjj Sr%)rfrgrequires_name_normalizeris rr+z6SuiteRequirements.denormalized_names..Gsvy0HHr z,Backend does not require denormalized names.rkrs rdenormalized_namesz$SuiteRequirements.denormalized_namesAs" ! H H :   r c.tjddS)zTtarget database must support multiple VALUES clauses in an INSERT statement.c&|jjj Sr%)rfrgsupports_multivalues_insertris rr+z7SuiteRequirements.multivalues_inserts..Qsvy0LLr z*Backend does not support multirow inserts.rkrs rmultivalues_insertsz%SuiteRequirements.multivalues_insertsKs" ! L L 8   r c(tjS)zvtarget dialect implements the executioncontext.get_lastrowid() method without reliance on RETURNING. rrs rimplements_get_lastrowidz*SuiteRequirements.implements_get_lastrowidUr9r c(tjS)a<target dialect retrieves cursor.lastrowid, or fetches from a database-side function after an insert() construct executes, within the get_lastrowid() method. Only dialects that "pre-execute", or need RETURNING to get last inserted id, would return closed/fail/skip for this. r rs remulated_lastrowidz$SuiteRequirements.emulated_lastrowid] """r c(tjS)z]target platform includes a 'lastrowid' accessor on the DBAPI cursor object. r rs rdbapi_lastrowidz!SuiteRequirements.dbapi_lastrowidirLr c(tjS)z#Target database must support VIEWs.r rs rviewszSuiteRequirements.viewsqr#r c(tjS)zXTarget database must support external schemas, and have one named 'test_schema'.r rs rschemaszSuiteRequirements.schemaswr]r c(tjS)zJtarget system must support reflection of inter-schema foreign keysr rs rcross_schema_fk_reflectionz,SuiteRequirements.cross_schema_fk_reflection~r#r c(tjS)aTarget supports refleciton of FOREIGN KEY constraints and will return the name of the constraint that was used in the "CONSTRANT FOREIGN KEY" DDL. MySQL prior to version 8 and MariaDB prior to version 10.5 don't support this. r rs r&foreign_key_constraint_name_reflectionz8SuiteRequirements.foreign_key_constraint_name_reflectionrr c(tjS)ztarget system has a strong concept of 'default' schema that can be referred to implicitly. basically, PostgreSQL. r rs rimplicit_default_schemaz)SuiteRequirements.implicit_default_schema """r c0tjdgdS)z0Target dialect must support server side cursors.c$|jjjSr%)rfrgsupports_server_side_cursorsris rr+z7SuiteRequirements.server_side_cursors..sFI-Jr zno server side cursors supportr,rs rserver_side_cursorsz%SuiteRequirements.server_side_cursorss%! J J K ,   r c0tjdgdS)z'Target database must support SEQUENCEs.c$|jjjSr%)rfrgsupports_sequencesris rr+z-SuiteRequirements.sequences..sFI-@r zno sequence supportr,rs r sequenceszSuiteRequirements.sequencess%! @ @ A !   r c0tjdgdS)zgTarget database supports sequences, but also optionally as a means of generating new PK values.cF|jjjo|jjjSr%)rfrgrsequences_optionalris rr+z6SuiteRequirements.sequences_optional..s!vy0C 9I%8r z.no sequence support, or sequences not optionalr,rs rrz$SuiteRequirements.sequences_optionals- !99  =    r c.tjdgS)atarget database / driver supports cursor.lastrowid as a means of retrieving the last inserted primary key value. note that if the target DB supports sequences also, this is still assumed to work. This is a new use case brought on by MariaDB 10.3. c$|jjjSr%)rfrgpostfetch_lastrowidris rr+z6SuiteRequirements.supports_lastrowid..sFI-Ar r,rs rsupports_lastrowidz$SuiteRequirements.supports_lastrowids"! A A B   r c4tj|jS)z"the opposite of supports_lastrowid)r NotPredicaterrs rno_lastrowid_supportz&SuiteRequirements.no_lastrowid_supports&t'>???r c(tjSr%r rs rreflects_pk_namesz#SuiteRequirements.reflects_pk_namesr'r c(tjSr%rrs rtable_reflectionz"SuiteRequirements.table_reflection   r c(tjSr%r rs rcomment_reflectionz$SuiteRequirements.comment_reflectionr'r c|jS)ztarget database must support retrieval of the columns in a view, similarly to how a table is inspected. This does not include the full CREATE VIEW definition. rrs rview_column_reflectionz(SuiteRequirements.view_column_reflections zr c|jS)zStarget database must support inspection of the full CREATE VIEW definition.rrs rview_reflectionz!SuiteRequirements.view_reflections zr c|jSr%)rrs rschema_reflectionz#SuiteRequirements.schema_reflections |r c(tjSr%rrs r!primary_key_constraint_reflectionz3SuiteRequirements.primary_key_constraint_reflectionrr c(tjSr%rrs r!foreign_key_constraint_reflectionz3SuiteRequirements.foreign_key_constraint_reflectionrr c(tjSr%r rs r1foreign_key_constraint_option_reflection_ondeletezCSuiteRequirements.foreign_key_constraint_option_reflection_ondeleter'r c(tjSr%r rs r1foreign_key_constraint_option_reflection_onupdatezCSuiteRequirements.foreign_key_constraint_option_reflection_onupdater'r c(tjSr%rrs rtemp_table_reflectionz'SuiteRequirements.temp_table_reflectionrr c(tjS)z8target dialect supports listing of temporary table namesr rs rtemp_table_namesz"SuiteRequirements.temp_table_namesrQr c(tjS)z)target database supports temporary tablesrrs rtemporary_tablesz"SuiteRequirements.temporary_tables   r c(tjS)z(target database supports temporary viewsr rs rtemporary_viewsz!SuiteRequirements.temporary_views rQr c(tjSr%rrs rindex_reflectionz"SuiteRequirements.index_reflectionrr c(tjS)z?target database supports CREATE INDEX with per-column ASC/DESC.rrs rindexes_with_ascdescz&SuiteRequirements.indexes_with_ascdescrr c(tjS)z>target database supports CREATE INDEX against SQL expressions.r rs rindexes_with_expressionsz*SuiteRequirements.indexes_with_expressionsrQr c(tjS)z8target dialect supports reflection of unique constraintsrrs runique_constraint_reflectionz.SuiteRequirements.unique_constraint_reflectionrr c(tjS)z7target dialect supports reflection of check constraintsr rs rcheck_constraint_reflectionz-SuiteRequirements.check_constraint_reflection!rQr c(tjS)ztarget dialect raises IntegrityError when reporting an INSERT with a primary key violation. (hint: it should) rrs r$duplicate_key_raises_integrity_errorz6SuiteRequirements.duplicate_key_raises_integrity_error&r9r c(tjS)z3Target database must support VARCHAR with no lengthrrs runbounded_varcharz#SuiteRequirements.unbounded_varchar.rr c(tjS)zTarget database/dialect must support Python unicode objects with non-ASCII characters represented, delivered as bound parameters as well as in result rows. rrs r unicode_datazSuiteRequirements.unicode_data4r>r c(tjS)zRTarget driver must support some degree of non-ascii symbol names. r rs r unicode_ddlzSuiteRequirements.unicode_ddl=r]r c(tjS)z?Target driver can create tables with a name like 'some " table'rrs rsymbol_names_w_double_quotez-SuiteRequirements.symbol_names_w_double_quoteDrr c(tjS)ztarget dialect supports rendering of a date, time, or datetime as a literal string, e.g. via the TypeEngine.literal_processor() method. r rs rdatetime_literalsz#SuiteRequirements.datetime_literalsIrZr c(tjS)zUtarget dialect supports representation of Python datetime.datetime() objects.rrs rdatetimezSuiteRequirements.datetimeRrr c(tjS)zftarget dialect supports representation of Python datetime.datetime() with microsecond objects.rrs rdatetime_microsecondsz'SuiteRequirements.datetime_microsecondsYrr c(tjS)ztarget dialect supports representation of Python datetime.datetime() with microsecond objects but only if TIMESTAMP is used.r rs rtimestamp_microsecondsz(SuiteRequirements.timestamp_microseconds`r]r c(tjSzutarget dialect supports representation of Python datetime.datetime() objects with historic (pre 1970) values.r rs rdatetime_historicz#SuiteRequirements.datetime_historicgr]r c(tjS)zQtarget dialect supports representation of Python datetime.date() objects.rrs rdatezSuiteRequirements.datenrr c(tjS)zPtarget dialect accepts a datetime object as the target of a date column.rrs rdate_coerces_from_datetimez,SuiteRequirements.date_coerces_from_datetimeurr c(tjSrr rs r date_historiczSuiteRequirements.date_historic|r]r c(tjS)zQtarget dialect supports representation of Python datetime.time() objects.rrs rtimezSuiteRequirements.timerr c(tjS)zbtarget dialect supports representation of Python datetime.time() with microsecond objects.rrs rtime_microsecondsz#SuiteRequirements.time_microsecondsrr c(tjS)zttarget database/driver can allow BLOB/BINARY fields to be compared against a bound parameter value. rrs rbinary_comparisonsz$SuiteRequirements.binary_comparisonsr9r c(tjS)a!target backend supports simple binary literals, e.g. an expression like:: SELECT CAST('foo' AS BINARY) Where ``BINARY`` is the type emitted from :class:`.LargeBinary`, e.g. it could be ``BLOB`` or similar. Basically fails on Oracle. rrs rbinary_literalsz!SuiteRequirements.binary_literals   r c(tjS)z:target dialect supports 'AUTOCOMMIT' as an isolation_levelr rs r autocommitzSuiteRequirements.autocommitrQr c(tjS)ztarget dialect supports general isolation level settings. Note that this requirement, when enabled, also requires that the get_isolation_levels() method be implemented. r rs risolation_levelz!SuiteRequirements.isolation_levelrr cdS)aReturn a structure of supported isolation levels for the current testing dialect. The structure indicates to the testing suite what the expected "default" isolation should be, as well as the other values that are accepted. The dictionary has two keys, "default" and "supported". The "supported" key refers to a list of all supported levels and it should include AUTOCOMMIT if the dialect supports it. If the :meth:`.DefaultRequirements.isolation_level` requirement is not open, then this method has no return value. E.g.:: >>> testing.requirements.get_isolation_levels() { "default": "READ_COMMITED", "supported": [ "SERIALIZABLE", "READ UNCOMMITTED", "READ COMMITTED", "REPEATABLE READ", "AUTOCOMMIT" ] } Nr rrjs rget_isolation_levelsz&SuiteRequirements.get_isolation_levelssr c(tjS)z.target platform implements a native JSON type.r rs r json_typezSuiteRequirements.json_typer#r c|jS)zNtarget platform supports numeric array indexes within a JSON structure)r rs rjson_array_indexesz$SuiteRequirements.json_array_indexess ~r c(tjSr%rrs r(json_index_supplementary_unicode_elementz:SuiteRequirements.json_index_supplementary_unicode_elementrr c(tjS)zRtarget backend has general support for moderately high-precision numerics.rrs rprecision_numerics_generalz,SuiteRequirements.precision_numerics_generalrr c(tjS)zbtarget backend supports Decimal() objects using E notation to represent very small values.r rs r"precision_numerics_enotation_smallz4SuiteRequirements.precision_numerics_enotation_smallr#r c(tjS)zbtarget backend supports Decimal() objects using E notation to represent very large values.r rs r"precision_numerics_enotation_largez4SuiteRequirements.precision_numerics_enotation_larger#r c(tjS)ztarget backend supports values with many digits on both sides, such as 319438950232418390.273596, 87673.594069654243 r rs r*precision_numerics_many_significant_digitszr c(tjS)ztarget backend doesn't crash when you try to select a NUMERIC value that has a value of NULL. Added to support Pyodbc bug #351. rrs rfetch_null_from_numericz)SuiteRequirements.fetch_null_from_numeric;   r c(tjS)zUTarget database must support an unbounded Text() " "type such as TEXT or CLOBrrs r text_typezSuiteRequirements.text_typeErr c(tjS)zTtarget database can persist/return an empty string with a varchar. rrs rempty_strings_varcharz'SuiteRequirements.empty_strings_varcharLr9r c(tjS)zRtarget database can persist/return an empty string with an unbounded text.rrs rempty_strings_textz$SuiteRequirements.empty_strings_textTrr c(tjS)zUtarget database supports use of an unbounded textual field in a WHERE clause.rrs r"expressions_against_unbounded_textz4SuiteRequirements.expressions_against_unbounded_text[rr c(tjS)z;target driver must support the literal statement 'select 1'rrs r selectonezSuiteRequirements.selectonebrr c(tjS)z(Target database must support savepoints.r rs r savepointszSuiteRequirements.savepointsgr#r c(tjS)z4Target database must support two-phase transactions.r rs rtwo_phase_transactionsz(SuiteRequirements.two_phase_transactionsmr#r c(tjS)z'Target must support UPDATE..FROM syntaxr rs r update_fromzSuiteRequirements.update_fromsrQr c(tjS)z=Target must support DELETE FROM..FROM or DELETE..USING syntaxr rs r delete_fromzSuiteRequirements.delete_fromxrQr c(tjS)aTarget must support UPDATE (or DELETE) where the same table is present in a subquery in the WHERE clause. This is an ANSI-standard syntax that apparently MySQL can't handle, such as:: UPDATE documents SET flag=1 WHERE documents.title IN (SELECT max(documents.title) AS title FROM documents GROUP BY documents.user_id ) rrs rupdate_where_target_in_subqueryz1SuiteRequirements.update_where_target_in_subquery}rr c(tjS)zOtarget database must use a plain percent '%' as the 'modulus' operator.r rs rmod_operator_as_percent_signz.SuiteRequirements.mod_operator_as_percent_signr#r c(tjS)atarget backend supports weird identifiers with percent signs in them, e.g. 'some % column'. this is a very weird use case but often has problems because of DBAPIs that use python formatting. It's not a critical use case either. r rs rpercent_schema_namesz&SuiteRequirements.percent_schema_namesrr c(tjS)ztarget database supports ordering by a column from a SELECT inside of a UNION E.g. (SELECT id, ...) UNION (SELECT id, ...) ORDER BY id rrs rorder_by_col_from_unionz)SuiteRequirements.order_by_col_from_unionr%r c(tjS)atarget backend supports ORDER BY a column label within an expression. Basically this:: select data as foo from test order by foo || 'bar' Lots of databases including PostgreSQL don't support this, so this is off by default. r rs rorder_by_label_with_expressionz0SuiteRequirements.order_by_label_with_expressions """r c6fd}tj|S)NcV |dS#t$rYdSwxYw)NFT)get_order_by_collationNotImplementedError)rjrs rcheckz3SuiteRequirements.order_by_collation..checksC ++F333u&   tt s  ((rk)rrFs` rorder_by_collationz$SuiteRequirements.order_by_collations/     !%(((r ctr%)rErs rrDz(SuiteRequirements.get_order_by_collations!###r c(tjS)zUTarget driver must support non-ASCII characters being passed at all. rrs runicode_connectionsz%SuiteRequirements.unicode_connectionsrr c(tjS)zTarget driver must raise a DBAPI-level exception, such as InterfaceError, when the underlying connection has been closed and the execute() method is called. rrs rgraceful_disconnectsz&SuiteRequirements.graceful_disconnectsr9r c(tjS)zU Target must support simultaneous, independent database connections. rrs rindependent_connectionsz)SuiteRequirements.independent_connectionsrr c(tjS)z9Catchall for a large variety of MySQL on Windows failuresrrs rskip_mysql_on_windowsz'SuiteRequirements.skip_mysql_on_windowsrr c,tjdS)aTest environment must allow ad-hoc engine/connection creation. DBs that scale poorly for many connections, even when closed, i.e. Oracle, may use the "--low-connections" option which flags this requirement as not present. c|jjSr%)optionslow_connectionsris rr+z2SuiteRequirements.ad_hoc_engines..s 6>9r rkrs rad_hoc_enginesz SuiteRequirements.ad_hoc_enginess! 9 9   r c*tjdS)Ntiming_intensiver requires_tagrs rrWz"SuiteRequirements.timing_intensive&'9:::r c*tjdS)Nmemory_intensiverXrs rr\z"SuiteRequirements.memory_intensiverZr c.tjddS)zMark tests that use threading and mock at the same time - stability issues have been observed with coverage + python 3.3 c2tjo |jjSr%)rpy3krS has_coverageris rr+z7SuiteRequirements.threading_with_mock..s49D)Dr z%Stability issues with coverage + py3krkrs rthreading_with_mockz%SuiteRequirements.threading_with_mocks" ! D D 3   r c.tjddS)Nc"tjdkSN)sys version_infor r rr+z+SuiteRequirements.python2..sC$,r z Python version 2.xx is required.rkrs rpython2zSuiteRequirements.python2s ! , , .   r c.tjddS)Nc"tjdkSrdrfr r rr+z+SuiteRequirements.python3.. sC$t+r z Python version 3.xx is required.rkrs rpython3zSuiteRequirements.python3s ! + +-O   r c|jSr%)python36rs rpep520zSuiteRequirements.pep520s }r c.tjddS)Nc"tjdkS)N)rerfr r rr+z,SuiteRequirements.python36..C$v-r z*Python version 3.6 or greater is required.rkrs rrnzSuiteRequirements.python36 ! - - 8   r c.tjddS)Nc"tjdkS)N)rerfr r rr+z,SuiteRequirements.python37..rsr z*Python version 3.7 or greater is required.rkrs rpython37zSuiteRequirements.python37rtr c.tjddS)NctjSr%)rcpythonr r rr+z+SuiteRequirements.cpython..#sDLr zcPython interpreter neededr,rs rr{zSuiteRequirements.cpython s ! ">   r c@ddlmtjfddS)NrpicklecTtj r jdkptjdkS)NcPickle)rer)rpypyr rgrhr}srr+z5SuiteRequirements.non_broken_pickle..+s- M-9,*6)r z.Needs cPickle+cPython or newer Python 3 pickle)sqlalchemy.utilr~rr-)rr~s @rnon_broken_picklez#SuiteRequirements.non_broken_pickle&sC******! * * * * =    r c|jS)ztarget platform must remove all cycles unconditionally when gc.collect() is called, as well as clean out unreferenced subclasses. )r{rs rpredictable_gcz SuiteRequirements.predictable_gc1s |r c.tjddS)zTest should be skipped if coverage is enabled. This is to block tests that exercise libraries that seem to be sensitive to coverage, such as PostgreSQL notice logging. c|jjSr%)rSr`ris rr+z/SuiteRequirements.no_coverage..Bs 6>6r z(Issues observed when coverage is enabledrkrs r no_coveragezSuiteRequirements.no_coverage9s"! 6 6 6   r cdSNFr rs r_has_mysql_on_windowsz'SuiteRequirements._has_mysql_on_windowsFur cdSrr rs r_has_mysql_fully_case_sensitivez1SuiteRequirements._has_mysql_fully_case_sensitiveIrr c2tjfdS)Nc. Sr%) _has_sqlitersrr+z*SuiteRequirements.sqlite..Nsd.>.>.@.@*@r rkrs`rsqlitezSuiteRequirements.sqliteLs!"@"@"@"@AAAr c4tjfddS)Nc. Sr%)_has_cextensionsrsrr+z/SuiteRequirements.cextensions..Ss--///r zC extensions not installedrkrs`r cextensionszSuiteRequirements.cextensionsPs'! / / / /1M   r cLddlm} |ddS#t$rYdSwxYw)Nr) create_enginez sqlite://TF) sqlalchemyr ImportError)rrs rrzSuiteRequirements._has_sqliteVsP,,,,,,  M+ & & &4   55 s  ##c: ddlm}m}dS#t$rYdSwxYw)Nr) cresultproxy cprocessorsTF)rrrr)rrrs rrz"SuiteRequirements._has_cextensions_sF  < < < < < < < <4   55 s  c(tjS)zSupports computed columnsr rs rcomputed_columnsz"SuiteRequirements.computed_columnsgrQr c(tjS)z/Supports computed columns with `persisted=True`r rs rcomputed_columns_storedz)SuiteRequirements.computed_columns_storedlrQr c(tjS)z0Supports computed columns with `persisted=False`r rs rcomputed_columns_virtualz*SuiteRequirements.computed_columns_virtualqrQr c(tjS)zSIf the default persistence is virtual or stored when `persisted` is omittedr rs r"computed_columns_default_persistedz4SuiteRequirements.computed_columns_default_persistedvr#r c(tjS)zTIf persistence information is returned by the reflection of computed columnsr rs r"computed_columns_reflect_persistedz4SuiteRequirements.computed_columns_reflect_persisted|r#r c.tjddS)a Supports some form of "x IS [NOT] DISTINCT FROM y" construct. Different dialects will implement their own flavour, e.g., sqlite will emit "x IS NOT y" instead of "x IS DISTINCT FROM y". .. seealso:: :meth:`.ColumnOperators.is_distinct_from` c&|jjj Sr%)rfrgsupports_is_distinct_fromris rr+z=SuiteRequirements.supports_is_distinct_from..svy0JJr z4driver doesn't support an IS DISTINCT FROM constructrkrs rrz+SuiteRequirements.supports_is_distinct_froms"! J J B   r N)r r r propertyrrrrr"r&r.r0r2r4r6r8r;r=r@rCrErGrIrKrNrPrSrUrWrYr\r_rarcrmrsrwr|r~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrrrr r"r$r'r)r+r-r/r1r3r5r7r9r;r=r?rArGrDrJrLrNrPrUrWr\rarirlrornrxr{rrrrrrrrrrrrrrrr r rrrs !!X! !!X! !!X! !!X! ##X# ##X#  X !!X! !!X! !!X! !!X! !!X!!!X!!!X! ! !X ! ! !X !##X# !!X! ##X# ##X#!!X!##X###X###X###X# ##X###X# !!X!  ! !X ! ! !X !  X   X   X   X !!X!   X ##X#X!!X!   X   X !!X! # #X ###X###X# ##X# ##X#  # #X ###X#  X   X    X     X  @@X@##X#!!X!##X#XX X!!X!!!X!##X###X#!!X!##X#!!X!##X#!!X!!!X!##X#!!X!##X#!!X!!!X! !!X!##X# !!X!##X#!!X! !!X! ##X# ##X# !!X! !!X! ##X# !!X! !!X! !!X! ! !X !##X###X#   4##X# X !!X!!!X! ##X# ##X# ##X#!!X!(!!X!!!X!##X#!!X!!!X!!!X!!!X! !!X!!!X! !!X! !!X!##X# ##X# ##X###X# ! !X !##X#  # #X #!!X! # #X #))X)$$$!!X! !!X!!!X! !!X!   X  ;;X;;;X;  X   X   X X  X   X   X   X X   X  BBXB  X ##X###X###X###X# ##X#    X    r r)__doc__rgrrobjectrrr r rrs      6   t t t t t t t t t t r