[Tile-serving] [openstreetmap/osm2pgsql] Regression tests: fix usage of psycopg2.connect (#1530)
Sarah Hoffmann
notifications at github.com
Tue Jul 6 16:05:51 UTC 2021
Contrary to what one might expect, the connection context manager does not close the connection when leaving but just end the currently running transaction.
This commit removes all uses of the 'with' construct with connections and replaces them with a classic try/finally block, explicitly closing the connection on the way.
Fixes a breakage of the tests when used with the psycopg2 2.9 release.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1530
-- Commit Summary --
* regression tests: fix usage of psycopg2.connect
-- File Changes --
M tests/regression.py (28)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1530.patch
https://github.com/openstreetmap/osm2pgsql/pull/1530.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1530
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210706/62d4c868/attachment.htm>
More information about the Tile-serving
mailing list