Skip to content

Conversation

@AndrewJackson2020
Copy link
Contributor

This PR attempts to implement connection service file functionality into asyncpg.

Connection service files are a libpq feature that allows details of postgres connection strings to be stored in a file that is referenced via a service parameter in the connection string. This makes it very easy to ensure/enforce consistent connection strings across a codebase.

https://www.postgresql.org/docs/17/libpq-pgservice.html

@AndrewJackson2020
Copy link
Contributor Author

Another complication wrt the connection service functionality: apparently connection service files also allow ldap lookups.

https://www.postgresql.org/docs/current/libpq-ldap.html

Co-authored-by: Elvis Pranskevichus <[email protected]>
@AndrewJackson2020
Copy link
Contributor Author

I believe the test failure is due to a flaky test. Please let me know if there are any other changes that need to be made to this PR.

Copy link
Member

@elprans elprans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

@elprans elprans merged commit 1d63bb1 into MagicStack:master Oct 11, 2025
74 of 82 checks passed
elprans added a commit that referenced this pull request Nov 24, 2025
Enable Python 3.14 with experimental subinterpreter/freethreading
support.

Improvements
============

* Add Python 3.14 support, experimental subinterpreter/freethreading support (#1279)
  (by @elprans in 9e42642)

* Avoid performing type introspection on known types (#1243)
  (by @elprans in 5c9986c)

* Make `prepare()` not use named statements by default when cache is disabled (#1245)
  (by @elprans in 5b14653)

* Implement connection service file functionality (#1223)
  (by @AndrewJackson2020 in 1d63bb1)

Fixes
=====

* Fix multi port connection string issue (#1222)
  (by @AndrewJackson2020 in 01c0db7)

* Avoid leaking connections if _can_use_connection fails (#1269)
  (by @yuliy-openai in e94302d)

Other
=====

* Drop support for EOL Python 3.8 (#1281)
  (by @elprans in 6c2c490)
@elprans elprans mentioned this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants