U a@@shddlmZddlZddlmZddlmZddlmZGdd d ej Z d d Z d d Z dddZ dS))absolute_importN) assertions)exc)_warnings_warnc@seZdZdZdS)SATestSuiteWarningz?warning for a condition detected during tests that is non-fatalN)__name__ __module__ __qualname____doc__r r \C:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-nyjtotrf\sqlalchemy\testing\warnings.pyrsrcCst|tddS)Ncategory)rr)messager r rwarn_test_suitesrcCstjdtjdtjdtjdtjdtjdtjdtdtjdtdtjdtddtjdtddtjdtddtjdtjd dtjdtjd dd D]}tjd|tjd qz d dl }Wnt k rYnXtjd|j ddS)z/Set global warning behavior for the test suite.ignorererroralwaysz.*StopIteration)rrz.*inspect.get.*argspeczThe loop argument is deprecatedz.*\(deprecated since: 2.0\)$z8^The (Sybase|firebird) dialect is deprecated and will be)zWThe FromClause.select\(\) method will no longer accept keyword arguments in version 2.0zRThe Join.select\(\) method will no longer accept keyword arguments in version 2.0.z7The Join.select\(\).whereclause parameter is deprecatedzNThe (?:update|delete).whereclause parameter will be removed in SQLAlchemy 2.0.zIThe (?:insert|update).values parameter will be removed in SQLAlchemy 2.0.zPThe update.preserve_parameter_order parameter will be removed in SQLAlchemy 2.0.zVPassing dialect keyword arguments directly to the (?:Insert|Update|Delete) constructorzJCalling the mapper\(\) function directly outside of a declarative registryz7The ``declarative_base\(\)`` function is now available z9The ``has_inherited_table\(\)`` function is now availablez^The ``bind`` argument to declarative_base is deprecated and will be removed in SQLAlchemy 2.0.zThe Query\.get\(\) methodzThe Query\.from_self\(\) method!The Query\.with_parent\(\) methodrz(The Query\.select_entity_from\(\) methodz8The ``aliased`` and ``from_joinpoint`` keyword argumentsz:Using strings to indicate relationship names in Query.joinzHUsing strings to indicate column or relationship paths in loader optionszGUsing strings to indicate relationship names in the ORM with_parent\(\)zOThe Query.with_polymorphic\(\) method is considered legacy as of the 1.x serieszrPassing a chain of multiple join conditions to Query.join\(\) is deprecated and will be removed in SQLAlchemy 2.0.z8Query.join\(\) will no longer accept tuples as argumentsz7This Session located a target engine via bound metadataz/The Session.autocommit parameter is deprecated zF.*object is being merged into a Session along the backref cascade pathzBPassing bind arguments to Session.execute\(\) as keyword argumentszHThe merge_result\(\) method is superseded by the merge_frozen_result\(\)z4The Session.begin.subtransactions flag is deprecated)rrrNonce) warningsfilterwarningssa_excZSAPendingDeprecationWarningZSADeprecationWarning SAWarningrDeprecationWarningZRemovedIn20Warningpytest ImportErrorZPytestDeprecationWarning)msgrr r r setup_filterss^ < r Fc Cs0tjtj||d|W5QRSQRXdS)zzAssert that each of the given warnings are emitted by fn. Deprecated. Please use assertions.expect_warnings(). )regexN)rZ_expect_warningsrr)fnZ warning_msgsr!r r rassert_warningss r#)F) __future__rrrrrZutil.langhelpersrrrrr r#r r r rs    v