From cab56dc033a3a8060aafeb9bbcace4dd0781d068 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Thu, 29 Aug 2024 15:48:03 +0200 Subject: [PATCH] avoid future breaking change in psycopg ConnectionPool --- CHANGELOG.md | 10 +++++++++- src/pypgstac/python/pypgstac/db.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9ac6d..9a22168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## Unreleased +## [Unreleased] + +### Added - Add limited support for free-text search in the search functions. (Fixes #293) - the `q` parameter is converted from the @@ -13,6 +15,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). statement which is used to compare to the description, title, and keywords fields in items or collection_search - the text search is un-indexed and will be very slow for item-level searches! +### Fixed + +- Add `open=True` in `psycopg.ConnectionPool` to avoid future behavior change + ## [v0.9.1] ### Fixed @@ -516,6 +522,8 @@ _TODO_ - Fixed issue with pypgstac loads which caused some writes to fail ([#18](https://github.com/stac-utils/pgstac/pull/18)) +[Unreleased]: https://github.com/stac-utils/pgstac/compare/v0.9.1...main +[v0.9.1]: https://github.com/stac-utils/pgstac/compare/v0.9.0...v0.9.1 [v0.9.0]: https://github.com/stac-utils/pgstac/compare/v0.8.5...v0.9.0 [v0.8.5]: https://github.com/stac-utils/pgstac/compare/v0.8.4...v0.8.5 [v0.8.4]: https://github.com/stac-utils/pgstac/compare/v0.8.3...v0.8.4 diff --git a/src/pypgstac/python/pypgstac/db.py b/src/pypgstac/python/pypgstac/db.py index 61da1df..d4d7bb6 100644 --- a/src/pypgstac/python/pypgstac/db.py +++ b/src/pypgstac/python/pypgstac/db.py @@ -89,6 +89,7 @@ def get_pool(self) -> ConnectionPool: max_waiting=settings.db_max_queries, max_idle=settings.db_max_idle, num_workers=settings.db_num_workers, + open=True, ) return self.pool