Thread: [pgAdmin4][Patch]: RM #3458 Error when using python 3.7 Changed inversion 3.7: Enable PEP 479 for all code by default: a StopIteration errorraised in a generator is transformed into a RuntimeError.
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.