GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Implement connection service file functionality by AndrewJackson2020 · Pull Request #1223 · MagicStack/asyncpg

Conversation

@AndrewJackson2020

@AndrewJackson2020 AndrewJackson2020 commented Feb 7, 2025

Copy link
Copy Markdown
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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Andrew Jackson
Implement connection service file functionality
31c2d43
elprans
elprans reviewed Mar 19, 2025
View reviewed changes
Comment thread asyncpg/connect_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

elprans
elprans reviewed Mar 19, 2025
View reviewed changes
Comment thread asyncpg/connect_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

AndrewJackson2020 and others added 3 commits March 19, 2025 15:54
@AndrewJackson2020 @elprans
Update asyncpg/connect_utils.py
1f87efd
Co-authored-by: Elvis Pranskevichus <[email protected]>
CommanderKeynes
Cosolidate if statements
b1a723b
CommanderKeynes
Fix formatting
1c337cd
elprans
elprans reviewed Mar 20, 2025
View reviewed changes
Comment thread asyncpg/connect_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

CommanderKeynes added 3 commits March 20, 2025 19:05
CommanderKeynes
Move con service file parse below query
8558a46
CommanderKeynes
Add tests
b6fb1e4
CommanderKeynes
Fix format
93347b0
@AndrewJackson2020

AndrewJackson2020 commented Mar 21, 2025

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elprans
elprans reviewed Mar 21, 2025
View reviewed changes
Comment thread asyncpg/connect_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AndrewJackson2020 @elprans
Update asyncpg/connect_utils.py
c02781c
Co-authored-by: Elvis Pranskevichus <[email protected]>
@AndrewJackson2020

AndrewJackson2020 commented Mar 25, 2025

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elprans
elprans reviewed Mar 26, 2025
View reviewed changes
Comment thread asyncpg/connect_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Andrew Jackson added 2 commits March 26, 2025 13:44
Andrew Jackson
fix ssl handling
fc21240
Andrew Jackson
fix format
c99ad22
elprans
elprans reviewed Mar 26, 2025
View reviewed changes
Comment thread asyncpg/connection.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

CommanderKeynes
Add servicefile as parameter
ae843a2
elprans
elprans approved these changes Oct 11, 2025
View reviewed changes

@elprans elprans left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for contributing!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@elprans
elprans merged commit 1d63bb1 into MagicStack:master Oct 11, 2025
elprans added a commit that referenced this pull request Nov 24, 2025
@elprans
asyncpg v0.31.0
71775a6
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
asyncpg v0.31.0 #1291
Merged
@claude claude Bot mentioned this pull request Nov 25, 2025
Update dependency asyncpg to >=0.31.0,<0.32.0 mgh3326/auto_trader#80
Merged
1 task
bg-admin7 pushed a commit to bg-open-source/asyncpg that referenced this pull request Dec 10, 2025
Andrei K
Merge tag 'v0.31.0' into non-blocking-conns-v3
acc3154
asyncpg v0.31.0

Enable Python 3.14 with experimental subinterpreter/freethreading
support.

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

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

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

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

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

Fixes
=====

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

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

Other
=====

* Drop support for EOL Python 3.8 (MagicStack#1281)
  (by @elprans in 6c2c490)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEES/rQWfT9RAppNY3YXEaHeAYth78FAmkk6UMACgkQXEaHeAYt
# h7+LBw//fX/3/nHrEUctYR7A/WQqg2oj3nvk10b3OQjzHUGyHq0DhkSC7/H9P0FI
# vl0j2n+BfKcKxOw4OgbxDq5fff/a4ScsejVwsKqQEEDH9tiXAL2cIId1yvNWC9hJ
# 8WxmkJzbFHdrl1D3/pxUv15UoaMSZD1DtPXaYEupRyEKXVOfQ/ush5GU5M3vA19R
# aWrAFtbMd3MMfaBYEO1TQtZNCV3n3Dv8fmIwv8qPbqJt2lsk4HOE8F3Be/RGiaPZ
# dI9eGnZ+qmlYC/mZYKNywaBlm4v/hHhuGwSh8WdkY6h4lFkBl8HipuPpoNeWO/fd
# k5wl1Q2HA8i2qEokz7EzYPRYjOPZwXphxscRXJQbdlCNyfJ+lPTu3uAQ08RTnoGU
# +JROauwgtQknnZEGtRWNerRcbZE1D+SgkLhGkEk6+tcIJ0G2XoCsn7A/u9LMmZuN
# 7lcFnLEdDnUSaLx7SZgcbOKP1Acg1W2Vk375JxXrymGqq5FPss8cdg+KOFMNuljT
# v/RtKvAP3yXpR448uPQ6M4BNVJ5my3UwdPrHwpGNkSxaqKBGGtryBG4LLw43yPCg
# FPFO9P//z+59RsmAvilaOhT/pLhqRvOJTkaUt5bt6Fw+5SzCfNfciNkl4rBC+9EQ
# LC/NQmO9cFYlpnO7s3uF0M+JTLV1u0CJp5G5USiQiEU+tVlaH6E=
# =bEvL
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 12:24:51 AM CET
# gpg:                using RSA key 4BFAD059F4FD440A69358DD85C468778062D87BF
# gpg: Can't check signature: No public key
bg-admin7 pushed a commit to bg-open-source/asyncpg that referenced this pull request Dec 10, 2025
Andrei K
Merge tag 'v0.31.0' into non-blocking-conns-v4
64ddc43
asyncpg v0.31.0

Enable Python 3.14 with experimental subinterpreter/freethreading
support.

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

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

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

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

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

Fixes
=====

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

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

Other
=====

* Drop support for EOL Python 3.8 (MagicStack#1281)
  (by @elprans in 6c2c490)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEES/rQWfT9RAppNY3YXEaHeAYth78FAmkk6UMACgkQXEaHeAYt
# h7+LBw//fX/3/nHrEUctYR7A/WQqg2oj3nvk10b3OQjzHUGyHq0DhkSC7/H9P0FI
# vl0j2n+BfKcKxOw4OgbxDq5fff/a4ScsejVwsKqQEEDH9tiXAL2cIId1yvNWC9hJ
# 8WxmkJzbFHdrl1D3/pxUv15UoaMSZD1DtPXaYEupRyEKXVOfQ/ush5GU5M3vA19R
# aWrAFtbMd3MMfaBYEO1TQtZNCV3n3Dv8fmIwv8qPbqJt2lsk4HOE8F3Be/RGiaPZ
# dI9eGnZ+qmlYC/mZYKNywaBlm4v/hHhuGwSh8WdkY6h4lFkBl8HipuPpoNeWO/fd
# k5wl1Q2HA8i2qEokz7EzYPRYjOPZwXphxscRXJQbdlCNyfJ+lPTu3uAQ08RTnoGU
# +JROauwgtQknnZEGtRWNerRcbZE1D+SgkLhGkEk6+tcIJ0G2XoCsn7A/u9LMmZuN
# 7lcFnLEdDnUSaLx7SZgcbOKP1Acg1W2Vk375JxXrymGqq5FPss8cdg+KOFMNuljT
# v/RtKvAP3yXpR448uPQ6M4BNVJ5my3UwdPrHwpGNkSxaqKBGGtryBG4LLw43yPCg
# FPFO9P//z+59RsmAvilaOhT/pLhqRvOJTkaUt5bt6Fw+5SzCfNfciNkl4rBC+9EQ
# LC/NQmO9cFYlpnO7s3uF0M+JTLV1u0CJp5G5USiQiEU+tVlaH6E=
# =bEvL
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 12:24:51 AM CET
# gpg:                using RSA key 4BFAD059F4FD440A69358DD85C468778062D87BF
# gpg: Can't check signature: No public key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@elprans elprans elprans approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@AndrewJackson2020 @elprans
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.