From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aEgQEh3eCmHcTQAAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 20:36:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QN6hDR3eCmGCUwAA1q6Kng (envelope-from ) for ; Wed, 04 Aug 2021 18:36:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8B889168BB for ; Wed, 4 Aug 2021 20:36:12 +0200 (CEST) Received: from localhost ([::1]:55352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBLkR-0004w8-DC for larch@yhetil.org; Wed, 04 Aug 2021 14:36:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBLkJ-0004ex-C4 for guix-patches@gnu.org; Wed, 04 Aug 2021 14:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBLkJ-0007i1-1j for guix-patches@gnu.org; Wed, 04 Aug 2021 14:36:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBLkI-0004rR-Q9 for guix-patches@gnu.org; Wed, 04 Aug 2021 14:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49281] Add dynaconf Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Aug 2021 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49281 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Giacomo Leidi Cc: 49281@debbugs.gnu.org, 49833@debbugs.gnu.org Received: via spool by 49281-submit@debbugs.gnu.org id=B49281.162810214418641 (code B ref 49281); Wed, 04 Aug 2021 18:36:02 +0000 Received: (at 49281) by debbugs.gnu.org; 4 Aug 2021 18:35:44 +0000 Received: from localhost ([127.0.0.1]:45111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBLjs-0004qR-0K for submit@debbugs.gnu.org; Wed, 04 Aug 2021 14:35:44 -0400 Received: from out1.migadu.com ([91.121.223.63]:10700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBLjp-0004qF-HA; Wed, 04 Aug 2021 14:35:34 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628102131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TaT+XopdwN0R+R7kdsTUgPdd++9DzDoL8SBXyV8D2XA=; b=YBDSsmgnvq7fDjdrkx0jyABMwHpEorf3lT1kac3qNB4QXVcThgud5CDdquz3NsYCVsW0py IT+Vn57JSheIYz3fvRTiJUvJ+GbYKLATUKBODE1rB6G8u47aZkOUh3wv86+3IZx438plbc JaqCw82HGcGIIVxb+GOkkRzgi9exsQo= From: Sarah Morgensen References: <20210802181359.10695-1-goodoldpaul@autistici.org> <20210802181359.10695-3-goodoldpaul@autistici.org> Date: Wed, 04 Aug 2021 11:35:30 -0700 In-Reply-To: <20210802181359.10695-3-goodoldpaul@autistici.org> (Giacomo Leidi's message of "Mon, 2 Aug 2021 20:13:55 +0200") Message-ID: <86fsvp2h3h.fsf_-_@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Auth-User: iskarian@mgsn.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628102173; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=TaT+XopdwN0R+R7kdsTUgPdd++9DzDoL8SBXyV8D2XA=; b=F/oRKpZd86x2E+uWftACN+E7g50WMIZQT+VXhnMlWeYRmD3P25ETYEJ274Cx0lXNqtsGOt XUfdY3VdxWa4/o5j9ygGcoRONQ6hM7293OYhic1/x9QzJ3tDpuYvKQgzy1468/cIpZhUzL wOCEm9cnSvjCap9EfJRDNh6oT17YxRrG3CZR6KKDhP5jTjjN0JwbLuWdouB6Nx8XVHp9Hu k6+LtXl1XEzsYN2rplUJ7d528GAAhIWi+/gdAUzOLQQMC69YkXq/Ud7nBvAfKTAemcP8E/ rumZdKQJjpjuF1PWZzLYz5Ak/8K3cd+eLL5cnf7XTS4dfbV4/DSqPSNsTZHlrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628102173; a=rsa-sha256; cv=none; b=ibQJ7k2C9iBJSwFVumD4byOKIHlsXH3691zivh8+UAdjcwtNuB0IwLCGq+CeZ/oAosV7eZ JLZMbip5QEbifXGX3qju+g8qi/Bkp/hA8ihUSGsAuhDcl1BiRZRIixUSMVo1PMpqNwbFfh LBEl9P7vWmQLoZwgpT3Ey181cgj96yTqmkpCBMYGSSc7gRTq1CYOL4kApD7mLhD+eAYbgv ia6ZUT5I0z2E6v9o79qMJLayrZUiOQkE6COxhOdaQ64eqhd0iplzjeMiCDo4Vdv2zVX1mv s9p9GxUtUmf08OzAgk6HOmR0yNdvjgYCeW8kjOqrUzUso7WuAXAuhl5oKn8GUg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=YBDSsmgn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=YBDSsmgn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8B889168BB X-Spam-Score: 0.19 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6e0WSix+/jJ0 --=-=-= Content-Type: text/plain Hello, While we don't actually require doing this when pypi packages don't have tests, on a lark I went ahead and switched the source to upstream and enabled tests to make sure they passed. It looks like two are failing, but I'm not sure why. I've attached the patch to enable tests and the test output. Giacomo Leidi writes: > * gnu/packages/python-xyz.scm (python-dotenv): New variable. > --- > gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm > index cdfc78478c..f415d8b2c8 100644 > --- a/gnu/packages/python-xyz.scm > +++ b/gnu/packages/python-xyz.scm > @@ -26239,3 +26239,30 @@ enabling you to write CommonMark inside of Docutils & Sphinx projects.") > Qhull} for the computation of the convex hull, Delaunay triangulation, and > Voronoi diagram.") > (license license:expat))) > + > +(define-public python-dotenv > + (package > + (name "python-dotenv") > + (version "0.18.0") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "python-dotenv" version)) > + (sha256 > + (base32 > + "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg")))) > + (build-system python-build-system) > + (propagated-inputs > + `(("python-click" ,python-click-5))) > + (native-inputs > + `(("python-mock" ,python-mock) > + ("python-pytest" ,python-pytest) > + ("python-sh" ,python-sh))) > + (home-page > + "https://github.com/theskumar/python-dotenv") ^ Nitpick: this can go on one line. > + (synopsis > + "Setup environment variables according to .env files") ^ Likewise. > + (description > + "This package provides the @code{python-dotenv} Python module to > +read key-value pairs from a .env file and set them as environment variables") > + (license license:bsd-3))) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=python-dotenv-0.18.0.diff Content-Description: python-dotenv-0.18.0-enable-tests.patch diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f4f3b7fb3f..a5b700f2d3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -26282,16 +26282,31 @@ Voronoi diagram.") (version "0.18.0") (source (origin - (method url-fetch) - (uri (pypi-uri "python-dotenv" version)) + (method git-fetch) + (uri + (git-reference + (url "https://github.com/theskumar/python-dotenv") + (commit (string-append "v" version)))) (sha256 (base32 - "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg")))) + "1jdccd9s7ypsldafiv0mqgh616662fm5a5ppbhphnin44qv7mir1")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (setenv "PATH" + (string-append (assoc-ref outputs "out") "/bin:" + (getenv "PATH"))) + (add-installed-pythonpath inputs outputs) + (invoke "py.test" "tests/"))))))) (propagated-inputs `(("python-click" ,python-click-5))) (native-inputs - `(("python-mock" ,python-mock) + `(("python-ipython" ,python-ipython) + ("python-mock" ,python-mock) ("python-pytest" ,python-pytest) ("python-sh" ,python-sh))) (home-page --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=python-dotenv-0.18.0-tests.log Content-Description: python-dotenv-0.18.0-tests.log starting phase `check' ============================= test session starts ============================== platform linux -- Python 3.8.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 rootdir: /tmp/guix-build-python-dotenv-0.18.0.drv-0/source, inifile: setup.cfg plugins: hypothesis-5.4.1 collected 132 items tests/test_cli.py ..F............F.......... [ 19%] tests/test_ipython.py ... [ 21%] tests/test_main.py ..................................................... [ 62%] [ 62%] tests/test_parser.py ........................................... [ 94%] tests/test_utils.py . [ 95%] tests/test_variables.py ...... [100%] =================================== FAILURES =================================== ______________________________ test_list_no_file _______________________________ cli = def test_list_no_file(cli): result = cli.invoke(dotenv.cli.list, []) > assert (result.exit_code, result.output) == (1, "") E AssertionError: assert (-1, '') == (1, '') E At index 0 diff: -1 != 1 E Use -v to get the full diff tests/test_cli.py:31: AssertionError __________________________ test_set_non_existent_file __________________________ cli = def test_set_non_existent_file(cli): result = cli.invoke(dotenv.cli.set, ["a", "b"]) > assert (result.exit_code, result.output) == (1, "") E AssertionError: assert (-1, '') == (1, '') E At index 0 diff: -1 != 1 E Use -v to get the full diff tests/test_cli.py:113: AssertionError =============================== warnings summary =============================== tests/test_ipython.py::test_ipython_existing_variable_no_override tests/test_ipython.py::test_ipython_existing_variable_override tests/test_ipython.py::test_ipython_new_variable /gnu/store/m6wza0kv26bnpfaavw8xs1gw2cls6369-python-ipython-7.9.0/lib/python3.8/site-packages/IPython/paths.py:67: UserWarning: IPython parent '/' is not a writable location, using a temp directory. warn("IPython parent '{0}' is not a writable location," -- Docs: https://docs.pytest.org/en/latest/warnings.html ================== 2 failed, 130 passed, 3 warnings in 4.49s =================== --=-=-= Content-Type: text/plain -- Sarah --=-=-=--