pgweb: Powered by Python 3

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: "pgsql-www(at)lists(dot)postgresql(dot)org" <pgsql-www(at)lists(dot)postgresql(dot)org>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>
Subject: pgweb: Powered by Python 3
Date: 2019-01-26 19:47:22
Message-ID: 36eeb86c-546c-a02c-fb17-fb1beacd2241@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Hi,

As of earlier today, pgweb is now fully running using Python 3. Many
thanks to Magnus for his lead on this project and for the huge effort he
put in to ensure the code became Python 3 compatible.

As such, pgweb is dropping support for Python 2.

There are a few things to note for ongoing development.

1. All new patches to pgweb involving Python must be written in Python 3.

2. We will be enforcing the PEP8[1] style guide on all new Python code.
We have included a pre-commit git hook[2] that you can add to your local
repository to test for PEP8 style.

3. You will need to update your libraries for your Python 3 environment.
If you have a Python 2 virtualenv, you will need to remove it and
install one with Python 3. This can be done as such:

python3 -m venv /path/to/your/local/pgweb/external

Once you activate the virtualenv, you can reinstall the dependencies with:

pip install -r /path/to/your/local/pgweb/requirements.txt

which have been brought up-to-date.

4. If you have been developing a patch, please rebase against the
current HEAD and ensure it works for Python 3 and follows PEP8.

Thanks!

Jonathan

[1] https://www.python.org/dev/peps/pep-0008/
[2]
https://git.postgresql.org/gitweb/?p=pgweb.git;a=blob;f=tools/githook/pre-commit

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Devrim Gündüz 2019-01-26 21:43:00 Re: pgweb: Powered by Python 3
Previous Message Joe Conway 2019-01-23 11:48:50 Re: Editor privileges please!