From owner-svn-ports-head@freebsd.org Sun Feb 2 14:38:39 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D0BD2303A2 for ; Sun, 2 Feb 2020 14:38:39 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 489YVR3Jm7z4F5m for ; Sun, 2 Feb 2020 14:38:39 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: sunpoet) by smtp.freebsd.org (Postfix) with ESMTPSA id 3A41012A83 for ; Sun, 2 Feb 2020 14:38:39 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: by mail-ed1-f50.google.com with SMTP id m8so13183142edi.13 for ; Sun, 02 Feb 2020 06:38:39 -0800 (PST) X-Gm-Message-State: APjAAAWwRJ7iUEa0sAR7UcoRhWz/j5mN25B+0IvSFJVlw70h+GAoJIET +LfrAQ6qd5/8mMaFrsSE6ywOUvMrwWjBRWCCVjIpHQ== X-Google-Smtp-Source: APXvYqy7cDMIriNmUCc5YuuxGEf4B0B6WHLDYdvWgdo0/EYBZqTk/Itb8T0ypcOZXrb5xGnc2LyURPEJClgZWtX4TFQ= X-Received: by 2002:a17:906:8306:: with SMTP id j6mr16771605ejx.105.1580654318075; Sun, 02 Feb 2020 06:38:38 -0800 (PST) MIME-Version: 1.0 References: <202002021101.012B11G4079551@repo.freebsd.org> <86b5ba05-4c4e-404e-3951-3914ce42b3be@FreeBSD.org> In-Reply-To: <86b5ba05-4c4e-404e-3951-3914ce42b3be@FreeBSD.org> From: Po-Chuan Hsieh Date: Sun, 2 Feb 2020 22:38:01 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r524884 - head/mail/py-mail-parser To: Steve Wills Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2020 14:38:39 -0000 Hi Steve, On Sun, Feb 2, 2020 at 10:05 PM Steve Wills wrote: > Hi, > > On 2/2/20 6:01 AM, Sunpoet Po-Chuan Hsieh wrote: > > Author: sunpoet > > Date: Sun Feb 2 11:01:01 2020 > > New Revision: 524884 > > URL: https://svnweb.freebsd.org/changeset/ports/524884 > > > > Log: > > Limit ipaddress for Python prior to 3.3 > > This doesn't really say why this change was made. Could you explain > more? I'm guessing it's because ipaddress is part of stdlib in 3.3 and > later? > net/py-ipaddress is a port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2. And PY_IPADDRESS is set for python prior to 3.3. from Mk/Uses/python.mk: .if ${PYTHON_REL} < 3300 PY_IPADDRESS= ${PYTHON_PKGNAMEPREFIX}ipaddress>=1.0.23:net/py-ipaddress@ ${PY_FLAVOR} .else PY_IPADDRESS= .endif > > > > > - Bump PORTREVISION for package change > > > > Modified: > > head/mail/py-mail-parser/Makefile > > > > Modified: head/mail/py-mail-parser/Makefile > > > ============================================================================== > > --- head/mail/py-mail-parser/Makefile Sun Feb 2 11:00:56 2020 > (r524883) > > +++ head/mail/py-mail-parser/Makefile Sun Feb 2 11:01:01 2020 > (r524884) > > @@ -3,6 +3,7 @@ > > > > PORTNAME= mail-parser > > PORTVERSION= 3.12.0 > > +PORTREVISION= 1 > > CATEGORIES= mail python > > MASTER_SITES= CHEESESHOP > > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} > > @@ -23,6 +24,6 @@ USE_PYTHON= autoplist concurrent distutils > > NO_ARCH= yes > > > > post-patch: > > - @${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt > > + @${REINPLACE_CMD} -e "s|==|>=|; /ipaddress/ s|$$|; python_version > < '3.3'|" ${WRKSRC}/requirements.txt > > > > .include > > > > I think this would be better as a patch file than REINPLACE_CMD. Using > sed can break silently. It can break in multiple ways, for example, > cases where the sed is still there but does nothing are common. I've > even seen cases where the code changes in such a way that the sed > applied by a port Makefile did something different than it originally > did. Patch files are easier to send upstream or even for upstream > themselves to locate and adopt or modify. These are some of the reasons > why the Porters Handbook says this should be done with patch: > > https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html > > I've gone ahead and created a patch, see attached. I can open a Bugzilla > PR or Phabricator review if you prefer. I also went ahead and opened a > pull request upstream, assuming my understanding about ipaddress is > correct. > I've changed it to a patch file in r524958. Thanks. > > Thanks, > Steve > Regards, sunpoet