diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2019-01-12 23:22:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2019-01-12 23:22:47 +0000 |
commit | 8138e70d63216381b9b3cb7a64750a3add154ec6 (patch) | |
tree | ee798a4a4851af4431d738bce0c1b99b6b8267c7 /lib/sqlalchemy/sql/compiler.py | |
parent | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b (diff) | |
parent | a6094d6682c956ce8a77fbec2a2700f901f3e75e (diff) | |
download | sqlalchemy-8138e70d63216381b9b3cb7a64750a3add154ec6.tar.gz |
Merge "use ..deprecated directive w/ version in all cases"
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index fd9a0c202..a3184f270 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -312,7 +312,10 @@ class Compiled(object): @util.deprecated( "0.7", - ":class:`.Compiled` objects now compile " "within the constructor.", + "The :meth:`.Compiled.compile` method is deprecated and will be " + "removed in a future release. The :class:`.Compiled` object " + "now runs its compilation within the constructor, and this method " + "does nothing." ) def compile(self): """Produce the internal string representation of this element. @@ -3437,20 +3440,48 @@ class IdentifierPreparer(object): ) def quote_schema(self, schema, force=None): - """Conditionally quote a schema. + """Conditionally quote a schema name. + + The name is quoted if it is a reserved word, contains quote-necessary + characters, or is an instance of :class:`.quoted_name` which includes + ``quote`` set to ``True``. Subclasses can override this to provide database-dependent quoting behavior for schema names. - the 'force' flag should be considered deprecated. + :param schema: string schema name + :param force: this parameter is no longer used. + + .. deprecated:: 0.9 + + The :paramref:`.IdentifierPreparer.force` parameter is deprecated + and will be removed in a future release. Quoting preference + is now intrinsic to the string being quoted by making use of the + :class:`.quoted_name` class. """ return self.quote(schema, force) def quote(self, ident, force=None): - """Conditionally quote an identifier. + """Conditionally quote an identfier. + + The identifier is quoted if it is a reserved word, contains + quote-necessary characters, or is an instance of + :class:`.quoted_name` which includes ``quote`` set to ``True``. + + Subclasses can override this to provide database-dependent + quoting behavior for identifier names. + + :param ident: string identifier + :param force: this parameter is no longer used. + + .. deprecated:: 0.9 + + The :paramref:`.IdentifierPreparer.force` parameter is deprecated + and will be removed in a future release. Quoting preference + is now intrinsic to the string being quoted by making use of the + :class:`.quoted_name` class. - the 'force' flag should be considered deprecated. """ force = getattr(ident, "quote", None) |