Skip to content

Using non-ascii character in database password is not allowed in asyncpg, but postgresql allows non-ascci character in its password. #1018

Description

@sumitsharansatsangi

Hi, I was trying to insert a non-ascii character in the postgresql database password,
It works perfectly fine with the postgresql, Tried to connect using Beekeeper and works successfully.
I was able to connect my database, do some operation , everything was perfectly fine.

But when I tried to use it with asyncpg , it gives following error.

Traceback (most recent call last):
  File "asyncpg/protocol/coreproto.pyx", line 154, in asyncpg.protocol.protocol.CoreProtocol._process__auth
  File "asyncpg/protocol/coreproto.pyx", line 561, in asyncpg.protocol.protocol.CoreProtocol._parse_msg_authentication
  File "asyncpg/protocol/coreproto.pyx", line 649, in asyncpg.protocol.protocol.CoreProtocol._auth_password_message_md5
UnicodeEncodeError: 'ascii' codec can't encode characters in position 19-23: ordinal not in range(128)

I want to know , why the limitation from asyncpg, when postgresql is allowing it.

I request you to please remove the limitation , if there is no special reason to put it.

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions