Connect with passwordless DSN does not work
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Reproduce the failure with the passwordless PostgreSQL DSN shown and the create_async_engine entry point. Trace the password-authentication path around the reported _auth_password_message_cleartext traceback; done means a passwordless connection no longer raises the NoneType encode error, with coverage for this case.
Written by the indexing model from the issue text.
Description
Basically as the title says: Trying to connect with a DSN that contains no password does not work
DSN in question:
@property def dsn(self) -> str: return f"postgresql+asyncpg://{self.pguser}@{self.pghost}:{self.pgport}/{self.pgdatabase}"
results, when used with
`
def get_db_url() -> str:
config = get_config()
return config.postgres.dsn
engine = create_async_engine(
get_db_url(),
echo=True,
future=True,
)
`
in the error:
ERROR: Traceback (most recent call last): File "asyncpg/protocol/coreproto.pyx", line 168, in asyncpg.protocol.protocol.CoreProtocol._process__auth File "asyncpg/protocol/coreproto.pyx", line 577, in asyncpg.protocol.protocol.CoreProtocol._parse_msg_authentication File "asyncpg/protocol/coreproto.pyx", line 672, in asyncpg.protocol.protocol.CoreProtocol._auth_password_message_cleartext AttributeError: 'NoneType' object has no attribute 'encode'
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 469
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MagicStack/asyncpg
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MagicStack/asyncpg#1357 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
MagicStack/asyncpg#1354 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
MagicStack/asyncpg#1342 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
MagicStack/asyncpg#1340 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 28/100
MagicStack/asyncpg#1337 ·
All issues in MagicStack/asyncpg
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·