summaryrefslogtreecommitdiff
path: root/alembic/command.py
diff options
context:
space:
mode:
authorAsh Berlin-Taylor <ash_github@firemirror.com>2019-06-21 08:53:11 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-06-21 11:19:06 -0400
commit26453a8b284743bd590a86208968ca862caa67ca (patch)
treeb1037c30551216705a279062c1a297a04fac87ae /alembic/command.py
parenta8b60b4ad9fe8339629da9ce41853519460abb15 (diff)
downloadalembic-26453a8b284743bd590a86208968ca862caa67ca.tar.gz
Report warnings from caller's file/line number, not utils.py
Warnings emitted by Alembic now include a default stack level of 2, and in some cases it's set to 3, in order to help warnings indicate more closely where they are originating from. Pull request courtesy Ash Berlin-Taylor. Closes: #578 Pull-request: https://github.com/sqlalchemy/alembic/pull/578 Pull-request-sha: 49d2922dc61bfc6da42a5f45b53f04032970daeb Change-Id: I31e19cacd63a4a7ff0557d9e7f52d348f63744d6
Diffstat (limited to 'alembic/command.py')
-rw-r--r--alembic/command.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alembic/command.py b/alembic/command.py
index f8c81cc..3faafdd 100644
--- a/alembic/command.py
+++ b/alembic/command.py
@@ -476,7 +476,7 @@ def current(config, verbose=False, head_only=False):
script = ScriptDirectory.from_config(config)
if head_only:
- util.warn("--head-only is deprecated")
+ util.warn("--head-only is deprecated", stacklevel=3)
def display_version(rev, context):
if verbose: