From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E71021395E2 for ; Mon, 28 Nov 2016 10:06:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4128FE0AAA; Mon, 28 Nov 2016 10:06:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D7EEE0AAA for ; Mon, 28 Nov 2016 10:06:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 13D28341149 for ; Mon, 28 Nov 2016 10:06:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 67DC949F for ; Mon, 28 Nov 2016 10:06:21 +0000 (UTC) From: "Mart Raudsepp" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mart Raudsepp" Message-ID: <1480327454.8e8de310d617629fba0887d7760bec6ea54dbf08.leio@gentoo> Subject: [gentoo-commits] proj/grumpy:master commit in: backend/ X-VCS-Repository: proj/grumpy X-VCS-Files: backend/__init__.py X-VCS-Directories: backend/ X-VCS-Committer: leio X-VCS-Committer-Name: Mart Raudsepp X-VCS-Revision: 8e8de310d617629fba0887d7760bec6ea54dbf08 X-VCS-Branch: master Date: Mon, 28 Nov 2016 10:06:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fa1be2c1-291c-45ad-91f0-792d51df78ce X-Archives-Hash: e3ef9c2acbdda8bd3846ad634b2f6573 commit: 8e8de310d617629fba0887d7760bec6ea54dbf08 Author: Mart Raudsepp gentoo org> AuthorDate: Mon Nov 28 10:03:15 2016 +0000 Commit: Mart Raudsepp gentoo org> CommitDate: Mon Nov 28 10:04:14 2016 +0000 URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=8e8de310 Turn off flask-sqlalchemy modification tracking to silence a warning and save resources We shouldn't need SQLALCHEMY_TRACK_MODIFICATIONS, so just disable it as suggested to avoid the warning and save these little resources. This is a flask-sqlalchemy specific session event tracking thing; sqlalchemy itself provides its own mechanism for this these days, and if we need something like that, we should probably use those, not this flask-sqlalchemy thing. backend/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/__init__.py b/backend/__init__.py index 46a4007..4d78cd8 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -3,6 +3,7 @@ from flask_sqlalchemy import SQLAlchemy app = Flask("frontend") # FIXME: Finish rearranging frontend/backend modules properly instead of pretending to be frontend in backend/__init__ because jinja templates are looked for from /templates app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///../backend/grumpy.db" # FIXME: configuration support; weird ../ because of claiming we are "frontend" to Flask and want to keep the path the same it was before for now. But this problem should go away with config, at least for postgres :) +app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) from frontend import *