Re: [pgAdmin 4][Patch]: #7314 - psycopg2 to psycopg3 migration

From: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
To: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin 4][Patch]: #7314 - psycopg2 to psycopg3 migration
Date: 2022-09-14 06:52:59
Message-ID: CAFOhELeaOysetCume99yuo5f3YOm6PppFtvNZsrEb9chJRceDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Akshay,

Please find the attached updated patch.

On Tue, Sep 13, 2022 at 1:05 PM Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
wrote:

> Hi Khushboo
>
> Review comments are as follows:
>
> - View/Edit Data does not work. (Cursor could not be found for the
> async connection.)
>
> Fixed.

>
> - Graph Visualizer is not working. (raise IndexError("position out of
> bound") backend error)
>
> Fixed.

>
> - Add psycopg3 support in *setup_pip.py* inside the pkg/pip folder.
>
> Fixed.

>
> - Remove print statements from the "connection.py" and check other
> parts as well.
>
> Fixed.

>
> - Almost 35+ API test cases are failing for PG v11 to v15. I have
> excluded the Debugger test cases as it hangs.
>
> Will work on this once I resume office.

Thanks,
Khushboo

> *Note: *I have committed the changes to my personal GitHub branch, so you
> can send patches over it.
>
> On Mon, Sep 12, 2022 at 2:44 PM Khushboo Vashi <
> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>
>> Rebased patch attached.
>>
>> On Fri, Sep 9, 2022 at 11:01 AM Khushboo Vashi <
>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>
>>> Hello,
>>>
>>> Please find the attached updated patch.
>>>
>>> On Thu, Sep 1, 2022 at 1:01 PM Akshay Joshi <
>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Khushboo
>>>>
>>>> Following are the review comments:
>>>>
>>>> - Remove psycopg2 from requirements.txt
>>>>
>>>> Removed, the code also removed.
>>>
>>>>
>>>> - Set PG_DEFAULT_DRIVER to psycopg3 in config.py
>>>>
>>>> Done.
>>>
>>>>
>>>> - Remove all the imports of 'psycopg2' from the entire project.
>>>>
>>>> Done.
>>>
>>>>
>>>> - Query Tool not working with psycopg3 == 3.1
>>>>
>>>> Done.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>>>
>>>> On Tue, Aug 30, 2022 at 8:57 PM Khushboo Vashi <
>>>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Please find the attached patch to migrate psycopg2 to psycopg3. I have
>>>>> used psycopg v 3.1.0 which is yet to be released soon. To test the patch,
>>>>> one needs to clone the psycopg3 repo, build it and point it to the pgadmin
>>>>> venv.
>>>>>
>>>>> For the time being, psycopg2 and psycopg3 both can be configurable
>>>>> via PG_DEFAULT_DRIVER and can be used.
>>>>>
>>>>> With this patch many SQL Ascii related issues and Range partition
>>>>> related issues are resolved. For example: #7028, # 6575, #4061, #7165.
>>>>>
>>>>> I have verified some of them but we need to test all of them.
>>>>>
>>>>> Note: Debugger test cases are still failing, on which I am still
>>>>> working.
>>>>>
>>>>> Thanks,
>>>>> Khushboo
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> <http://www.enterprisedb.com>
>>>>
>>>> Akshay Joshi
>>>>
>>>> Principal Software Architect
>>>>
>>>> +91 9767888246
>>>>
>>>> www.enterprisedb.com
>>>>
>>>> <https://www.linkedin.com/company/edbpostgres>
>>>> <https://twitter.com/edbpostgres?lang=en>
>>>> <https://www.facebook.com/EDBpostgres>
>>>> <https://www.instagram.com/EDBpostgres/>
>>>>
>>>
>
> --
>
> <http://www.enterprisedb.com>
>
> Akshay Joshi
>
> Principal Software Architect
>
> +91 9767888246
>
> www.enterprisedb.com
>
> <https://www.linkedin.com/company/edbpostgres>
> <https://twitter.com/edbpostgres?lang=en>
> <https://www.facebook.com/EDBpostgres>
> <https://www.instagram.com/EDBpostgres/>
>

Attachment Content-Type Size
psycopg3_fixes.patch application/octet-stream 2.2 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Nikhil Mohite 2022-09-14 08:34:30 [pgAdmin]: Update debugger method after security fixes
Previous Message Khushboo Vashi 2022-09-14 04:38:30 [pgAdmin4][Patch]: SonarQube Vulnerabilities