From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH] gnu: Add python-contextlib2 Date: Mon, 14 Dec 2015 02:15:08 +0000 Message-ID: References: <564C7549.3070707@uq.edu.au> <87mvu0x4c9.fsf@gnu.org> <87d1ujw8mc.fsf@gnu.org> <874mfmuegk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3b13e8aaeff0526d23e40 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8IfZ-0006rU-7G for guix-devel@gnu.org; Sun, 13 Dec 2015 21:15:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8IfX-0003CU-A7 for guix-devel@gnu.org; Sun, 13 Dec 2015 21:15:21 -0500 In-Reply-To: <874mfmuegk.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: "guix-devel@gnu.org" --001a11c3b13e8aaeff0526d23e40 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for the response. The module is primarily a backport, but it also contains some features that are not part of the standard library. Therefore, it is not exactly the same as the Python standard library's contextlib module, even in Python 3. Since the module names don't collide, and since I know of at least one project that uses contextlib2 with Python3 [1], I think it'd be good to package it for both Python 2 and Python 3. If you or anyone else has a strong opinion on this, let's talk about it. [1] I intend to package vcrpy after I package contextlib2, since the former uses the latter: https://github.com/kevin1024/vcrpy/blob/master/setup.py On Sun, Dec 13, 2015, 15:16 Ludovic Court=C3=A8s wrote: > Chris Marusich skribis: > > > On 12/6/15, Ludovic Court=C3=A8s wrote: > >> Yes, could you adjust it and send an updated patch? > >> > > > > I've attached the new patch here. I've shortened a few lines, > > including the one requested. > > Great. > > > In particular, I've shortened every line of the description to 70 > > columns. Because of that, it looks like the first line of the > > description will wind up being significantly shorter than 70 chars. > > Are the newlines in the description significant? Or is there some > > reformatting that happens when the description is printed to the > > terminal, e.g. via "guix package --search=3Dfoo"? > > Yes, there=E2=80=99s reformatting happening here, so don=E2=80=99t worry.= We normally > wrap at 78 columns, as per .dir-locals.el. > > >> I must I was a bit confused, partly due to the reply-on-top, which mad= e > >> it more difficult for me to see what you were referring to. Okay, I w= as > >> also late for other reasons ;-), but still, I think it=E2=80=99d be gr= eat if you > >> could avoid top-posting. > > > > Thanks for pointing this out; I'll reply on the bottom from now on! > > Thanks. :-) > > > From 4089b10f384b389999576dfc8766c661a5787a4b Mon Sep 17 00:00:00 2001 > > From: Chris Marusich > > Date: Mon, 7 Dec 2015 21:07:40 -0800 > > Subject: [PATCH] gnu: Add python-contextlib2. > > > > * gnu/packages/python.scm (python-contextlib2, python2-contextlib2): > > New variables. > > [...] > > > + (home-page "http://contextlib2.readthedocs.org/") > > + (synopsis "Tools for decorators and context managers") > > + (description "This module is primarily a backport of the Python > > +3.2 contextlib to earlier Python versions. Like contextlib, it > > +provides utilities for common tasks involving decorators and context > > +managers. It also contains additional features that are not part of > > +the standard library.") > > + (license psfl))) > > + > > +(define-public python2-contextlib2 > > + (package-with-python2 python-contextlib2)) > > IIUC the description it only makes sense for Python 2.x, right? > > In that case, could you add an explicit #:python in =E2=80=98arguments=E2= =80=99 and keep > only the 2.x variant? I could do that for you if you prefer. > > Thanks, and sorry for the delay! > > Ludo=E2=80=99. > --001a11c3b13e8aaeff0526d23e40 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Thanks for the response. The module is primarily a backport,= but it also contains some features that are not part of the standard libra= ry. Therefore, it is not exactly the same as the Python standard library= 9;s contextlib module, even in Python 3. Since the module names don't c= ollide, and since I know of at least one project that uses contextlib2 with= Python3 [1], I think it'd be good to package it for both Python 2 and = Python 3. If you or anyone else has a strong opinion on this, let's tal= k about it.

[1] I intend to package vcrpy after I package contextlib2, s= ince the former uses the latter: https://github.com/kevin1024/vcrpy/blob/master/se= tup.py


On Sun, Dec 13, 2015, 15:16= =C2=A0Ludovic Court=C3=A8s <ludo@gnu.org= > wrote:
Chris Marusich <= cmmarusich@gmail.= com> skribis:

> On 12/6/15, Ludovic Court=C3=A8s <ludo@gnu.org> wrote:
>> Yes, could you adjust it and send an updated patch?
>>
>
> I've attached the new patch here. I've shortened a few lines,<= br> > including the one requested.

Great.

> In particular, I've shortened every line of the description to 70<= br> > columns. Because of that, it looks like the first line of the
> description will wind up being significantly shorter than 70 chars. > Are the newlines in the description significant? Or is there some
> reformatting that happens when the description is printed to the
> terminal, e.g. via "guix package --search=3Dfoo"?

Yes, there=E2=80=99s reformatting happening here, so don=E2=80=99t worry.= =C2=A0 We normally
wrap at 78 columns, as per .dir-locals.el.

>> I must I was a bit confused, partly due to the reply-on-top, which= made
>> it more difficult for me to see what you were referring to.=C2=A0 = Okay, I was
>> also late for other reasons ;-), but still, I think it=E2=80=99d b= e great if you
>> could avoid top-posting.
>
> Thanks for pointing this out; I'll reply on the bottom from now on= !

Thanks.=C2=A0 :-)

> From 4089b10f384b389999576dfc8766c661a5787a4b Mon Sep 17 00:00:00 2001=
> From: Chris Marusich <cmmarusich@gmail.com>
> Date: Mon, 7 Dec 2015 21:07:40 -0800
> Subject: [PATCH] gnu: Add python-contextlib2.
>
> * gnu/packages/python.scm (python-contextlib2, python2-contextlib2): >=C2=A0 =C2=A0New variables.

[...]

> +=C2=A0 =C2=A0 (home-page "http://contextlib2.readthedo= cs.org/")
> +=C2=A0 =C2=A0 (synopsis "Tools for decorators and context manage= rs")
> +=C2=A0 =C2=A0 (description "This module is primarily a backport = of the Python
> +3.2 contextlib to earlier Python versions.=C2=A0 Like contextlib, it<= br> > +provides utilities for common tasks involving decorators and context<= br> > +managers.=C2=A0 It also contains additional features that are not par= t of
> +the standard library.")
> +=C2=A0 =C2=A0 (license psfl)))
> +
> +(define-public python2-contextlib2
> +=C2=A0 (package-with-python2 python-contextlib2))

IIUC the description it only makes sense for Python 2.x, right?

In that case, could you add an explicit #:python in =E2=80=98arguments=E2= =80=99 and keep
only the 2.x variant?=C2=A0 I could do that for you if you prefer.

Thanks, and sorry for the delay!

Ludo=E2=80=99.
--001a11c3b13e8aaeff0526d23e40--