public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Page <[email protected]>
To: Yogesh Mahajan <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Feature tests on M1 Mac fail
Date: Thu, 11 May 2023 10:13:42 +0100
Message-ID: <CA+OCxozUqNByCu8ECbOemT1C0A4AZgSpxDcGXk0cF8uFP1tOVA@mail.gmail.com> (raw)
In-Reply-To: <CAMa=N=MkGh0mJdT9oxEN0vLdNrKFVknENxtMZn3Dieudx66yPw@mail.gmail.com>
References: <CA+OCxoxmFa5VvV6LM3JGOv4cvqFUvDo=PGanEjK95=X8jPdkcQ@mail.gmail.com>
	<CAMa=N=P2pVD1_Zq4iOHHZdCdvnRZi271vVH1sBV=BJe9Utdp9Q@mail.gmail.com>
	<CA+OCxoxOxxRcinhkkh8MNy7HcXmi8v5DbL_y00sFtBsej536tQ@mail.gmail.com>
	<CAMa=N=MpdvHuYG+=n1kouFJTCLTivSB3tRBq9zKN=YSXPhB9xA@mail.gmail.com>
	<CA+OCxowSsDoJ15c4Dz8Z2DRnaq7-rrBNyNfdT_De2wXiKdTbZQ@mail.gmail.com>
	<CAMa=N=MkGh0mJdT9oxEN0vLdNrKFVknENxtMZn3Dieudx66yPw@mail.gmail.com>

Hi

On Thu, 11 May 2023 at 09:26, Yogesh Mahajan <
[email protected]> wrote:

> Hi,
>
> I have tried with python 3.10. 3.11 by creating fresh venv on Mac, but I
> could not reproduce the problem.
> As you said earlier, this could be architecture specific.
> Would it be possible to provide access to above to me or if any database
> server credentials that I can use to test with.
> Simple problem over here is -
>
> pg_cursor.execute("SELECT version()") is returning, bytes object which is not expected.
>
> We can add typecasting here to fix the issue if we are sure about the exact root cause of the issue.
>
> Well unlike yesterday, I happen to have both Intel and M1 Macs here today,
and whaddya know, it does look like a psycopg bug:

Python 3.10.11 (v3.10.11:7d4cc5aa85, Apr  4 2023, 19:05:19) [Clang 13.0.0
(clang-1300.0.29.30)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import psycopg

>>> with psycopg.connect("dbname=postgres user=dpage") as conn:

...     with conn.cursor() as cur:

...             cur.execute("SELECT version()")

...             cur.fetchone()

...

<psycopg.Cursor [TUPLES_OK] [INTRANS] (user=dpage database=postgres) at
0x103a72610>

(b'PostgreSQL 15.1 on aarch64-apple-darwin22.1.0, compiled by Apple clang
version 14.0.0 (clang-1400.0.29.202), 64-bit',)




(venv) dpage@gibson ~ % python

Python 3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0
(clang-1300.0.29.30)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import psycopg

>>> with psycopg.connect("dbname=postgres user=dpage") as conn:

...     with conn.cursor() as cur:

...             cur.execute("SELECT version()")

...             cur.fetchone()

...

<psycopg.Cursor [TUPLES_OK] [INTRANS] (user=dpage database=postgres) at
0x10e6c7530>

('PostgreSQL 15.2 (Homebrew) on x86_64-apple-darwin22.3.0, compiled by
Apple clang version 14.0.0 (clang-1400.0.29.202), 64-bit',)



I've raised that with the psycopg devs:
https://github.com/psycopg/psycopg/issues/561


Thanks!


-- 
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com


view thread (7+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Feature tests on M1 Mac fail
  In-Reply-To: <CA+OCxozUqNByCu8ECbOemT1C0A4AZgSpxDcGXk0cF8uFP1tOVA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox