Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMsFQ-0002lb-B4 for pgadmin-hackers@arkaria.postgresql.org; Mon, 28 Sep 2020 12:27:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kMsFP-0002R6-7m for pgadmin-hackers@arkaria.postgresql.org; Mon, 28 Sep 2020 12:27:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMsFP-0002QL-0s for pgadmin-hackers@lists.postgresql.org; Mon, 28 Sep 2020 12:27:15 +0000 Received: from mail-il1-x144.google.com ([2607:f8b0:4864:20::144]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kMsFM-0005mg-Bd for pgadmin-hackers@postgresql.org; Mon, 28 Sep 2020 12:27:14 +0000 Received: by mail-il1-x144.google.com with SMTP id e5so990982ilr.8 for ; Mon, 28 Sep 2020 05:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TB+dtehIlCCiSD61ur33yYeqW5nCDB17cSvwhxMr580=; b=g61NwgTeFBx5QYINwWKhEbugpM5YeGCiWaTrlMF4WorLapdVgr0qMSVmZZ4iRfn43L r6/zjod+mB/m2P79MRduTYR9PVt1lRHrMSGU6l0oMkPSc/H/ugxoEm5B0plSoWNxampc yW07dUm8HbtYaq/34/N+0zYbJTJsnPsojalm9M7Mv8nbdlBt+Xd+iZJ/mabECngPbJ8r N+cN77Fs7GVGEtWROcpKOqz8Y8I/96kH4GUKY/RXZUoBjOt6UjX7Aao4siDm3vyCe+yt oehaAQsvky1fgVKhNXY6+++2YAYWXzKKEl7gR2NniFHlTPTMrEoO6bfBAELXnmFVoroX 2vhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TB+dtehIlCCiSD61ur33yYeqW5nCDB17cSvwhxMr580=; b=HpcpuooAFLA9LdlyOyYoisEaIbfXwAMhOxNEMIEMxNG0Z82yAeORQspaAQLa0Vv1JY sek9nW44QzJr7vBO593qhACkr9OGkj9bhBALmwQX0cnaNaIiIpQmD7zXyw1co0zUA9fJ zA2aS+YjULh608aK05nt0r4KVJ3BLjrw8KC4/2LlOFf0IWzcW1ErIcGAgMvaoWnxjQit x0M+Ml1apNBCVAXJ5zEQ16kaJ+sQnnJzgyWo8IVf7xiHX6d+61AFLXEy3Fc6wZCwTM22 4qY9CqPQ3T6Wv9q6lahLT2hydlTlHdCMQiDWlpF+gcxTQIhHIbLGyf7pQV8mgpnVQcmU 4Iow== X-Gm-Message-State: AOAM532uxoShLehSG4IvNKZnHzLdSMN8eGorgLG+zubf3PL8mhGDo5Q4 WvF11Yw3lB5IOyLdeWGSV/ONbdJ3sSj6s5qo23ClxE8q6BUfy5jhIa3VwdIWdjLRQ/nYbMeGN+j AWUKD5yEEvnfa+ukE7Da94/kGetDw9yIzA81+2LIJ4l8KwdbPNzeOBAxeMiZCrJpSR0UN5YNlkx 0qC6TxfhLcDr1UircaY5YloiRjigcHaUFM2NjMlqx+bockiZU1m3gskuA8rQ== X-Google-Smtp-Source: ABdhPJyBffDKq/8ayBFdKDPHpB3E/mHJgQDqlYQnWRAfyZIonRheWNIjhqFp+6EztJYdXhyccKMVqjr+r93nL59JI/0= X-Received: by 2002:a92:cd06:: with SMTP id z6mr893725iln.252.1601296030453; Mon, 28 Sep 2020 05:27:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Mon, 28 Sep 2020 17:56:59 +0530 Message-ID: Subject: Re: [pgAdmin] Fix incorrect import in setup.py To: Aditya Toshniwal Cc: =?UTF-8?Q?Azad_Salahl=C4=B1?= , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000136f4505b05ec9d2" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000136f4505b05ec9d2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, patch applied. On Mon, Sep 28, 2020 at 4:48 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Azad, > > The patch looks good to me. > > On Thu, Sep 24, 2020 at 6:33 PM Azad Salahl=C4=B1 > wrote: > >> Hi, >> >> First time posting here. I've attached a fix for an incorrect import >> in `setup.py`. Trying to import from `pgadmin` before adding the root >> directory to the system path results in import error, when the script >> is invoked in any other way than running it directly. For example >> >> $ /path/to/venv/bin/pip install pgadmin4 >> $ /path/to/venv/bin/python -m pgadmin4.setup >> Traceback (most recent call last): >> ... >> File "/path/to/venv/lib/python3.6/site-packages/pgadmin4/setup.py"= , >> line 18, in >> from pgadmin.model import db, User, Version, ServerGroup, Server= , >> \ >> ModuleNotFoundError: No module named 'pgadmin' >> >> Please let me know what you think. Happy to address any feedback. >> >> Regards, >> Azad Salahl=C4=B1 >> > > > -- > Thanks, > Aditya Toshniwal > pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* > > "Don't Complain about Heat, Plant a TREE" > --=20 *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Sr. Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --000000000000136f4505b05ec9d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, patch applied.

On Mon, Sep 28, 2020 at 4:48 PM = Aditya Toshniwal <a= ditya.toshniwal@enterprisedb.com> wrote:
Hi Azad,

The patch looks= good to me.

On Thu, Sep 24, 2020 at 6:33 PM Azad Salahl=C4=B1 <azad.salahli@gmail= .com> wrote:
Hi,

First time posting here. I've attached a fix for an incorrect import in `setup.py`. Trying to import from `pgadmin` before adding the root
directory to the system path results in import error, when the script
is invoked in any other way than running it directly. For example

=C2=A0 =C2=A0 $ /path/to/venv/bin/pip install pgadmin4
=C2=A0 =C2=A0 $ /path/to/venv/bin/python -m pgadmin4.setup
=C2=A0 =C2=A0 Traceback (most recent call last):
=C2=A0 =C2=A0 =C2=A0 ...
=C2=A0 =C2=A0 =C2=A0 File "/path/to/venv/lib/python3.6/site-packages/p= gadmin4/setup.py",
line 18, in <module>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 from pgadmin.model import db, User, Version, Se= rverGroup, Server, \
=C2=A0 =C2=A0 ModuleNotFoundError: No module named 'pgadmin'

Please let me know what you think. Happy to address any feedback.

Regards,
Azad Salahl=C4=B1


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
pgAdmi= n Hacker | Sr. Software Architect
EDB Postgres
Mobile: +91 976-788-8246
=
--000000000000136f4505b05ec9d2--