[pgAdmin4][Patch]: RM #3458 Error when using python 3.7 Changed in version 3.7: Enable PEP 479 for all code by default: a StopIteration error raised in a generator is transformed into a RuntimeError.

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgAdmin4][Patch]: RM #3458 Error when using python 3.7 Changed in version 3.7: Enable PEP 479 for all code by default: a StopIteration error raised in a generator is transformed into a RuntimeError.
Date: 2018-08-02 08:03:46
Message-ID: CANxoLDcoqxeV=njKW1mwJqYt0F=x1vDrvNBnaCdC4hhyaifQvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Hackers,

Attached is the patch to fix the RM #3458 Error when using python 3.7.
Please review it.

Issues with Python 3.7:

- "*async*" is a keyword in Python 3.7. psycopg2 has renamed "*async*"
to "*async_*", similarly I have renamed from "*async*" to "*async_*" for
all the occurrence.
- Got *RuntimeError: generator raised StopIteration. *Following
statement found in the documentation for StopIteration exception:
- Changed in version 3.7: Enable PEP 479 for all code by default: a
StopIteration error raised in a generator is transformed into a
RuntimeError.

To fix that handle the exception in "cursor.py" file.

- Got urllib.error.URLError: <urlopen error [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local
issuer certificate (_ssl.c:1045)> error in the backend. On google I came
to know that "This often occurs because OpenSSL does not have access to
the system’s root certificates or the certificates are out of date".
- To fix that on OSX I have run "*open /Applications/Python\
3.7/Install\ Certificates.command*". *Do we need to modify installers
for this change*?
- Fixed one regex related issues for auto complete.

Tested patch with Python 2.7, Python 3.5 and Python3.7. Run regression test
on PG/EPAS 11, PG/EPAS 9.6. Run feature test on PG 11.

--
*Akshay Joshi*

*Sr. Software Architect *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

Attachment Content-Type Size
RM_3458.patch application/octet-stream 7.4 KB

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2018-08-02 08:34:33 Re: [pgAdmin4][Patch]: RM #3458 Error when using python 3.7
Previous Message Aditya Toshniwal 2018-08-02 07:37:35 Re: [pgAdmin4][RM2136] Include "?<intver>" on all routes that are loaded