]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
psycopg2 NOTICE fixup
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 9 Jun 2019 14:59:23 +0000 (10:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 9 Jun 2019 15:59:22 +0000 (11:59 -0400)
commitb0bf421f1b12eeedd77ec6c39df8e5e6cc1fcc3f
tree8905048db510986642f7978192751f3d471661ad
parente2521b595ae8b5b4ca8147c5ee13e2fc0f597e63
psycopg2 NOTICE fixup

- don't call relatively expensive isEnabledFor(), just call _log_notices
- don't reset the list if it's empty
- fix the test to use a custom function to definitely create a notice, confirmed
that PG seems to no longer create the "implicit sequence" notices
- assert that the reset of the notices works too
- update the docs to illustrate for folks who haven't worked with logging before

Change-Id: I7291e647c177d338e0ad673f3106b4d503e4b3ea
lib/sqlalchemy/dialects/postgresql/psycopg2.py
test/dialect/postgresql/test_dialect.py