From owner-svn-ports-all@freebsd.org Sun Aug 4 04:31:15 2019 Return-Path: Delivered-To: svn-ports-all@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 81538C4636; Sun, 4 Aug 2019 04:31:15 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 461Sdb2yXhz45NJ; Sun, 4 Aug 2019 04:31:15 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 475F125F04; Sun, 4 Aug 2019 04:31:15 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x744VFP7058566; Sun, 4 Aug 2019 04:31:15 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x744VEpl058449; Sun, 4 Aug 2019 04:31:14 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201908040431.x744VEpl058449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Sun, 4 Aug 2019 04:31:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r508053 - in head/textproc/py-docutils: . files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: in head/textproc/py-docutils: . files X-SVN-Commit-Revision: 508053 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2019 04:31:15 -0000 Author: sunpoet Date: Sun Aug 4 04:31:14 2019 New Revision: 508053 URL: https://svnweb.freebsd.org/changeset/ports/508053 Log: Fix build of dependent ports with Python 2.7 - Bump PORTREVISION for package change Obtained from: https://sourceforge.net/p/docutils/code/8294/ Added: head/textproc/py-docutils/files/ head/textproc/py-docutils/files/patch-docutils-nodes.py (contents, props changed) head/textproc/py-docutils/files/patch-docutils-utils-__init__.py (contents, props changed) Modified: head/textproc/py-docutils/Makefile Modified: head/textproc/py-docutils/Makefile ============================================================================== --- head/textproc/py-docutils/Makefile Sun Aug 4 04:27:35 2019 (r508052) +++ head/textproc/py-docutils/Makefile Sun Aug 4 04:31:14 2019 (r508053) @@ -3,6 +3,7 @@ PORTNAME= docutils PORTVERSION= 0.15 +PORTREVISION= 1 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/textproc/py-docutils/files/patch-docutils-nodes.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-docutils/files/patch-docutils-nodes.py Sun Aug 4 04:31:14 2019 (r508053) @@ -0,0 +1,43 @@ +Obtained from: https://sourceforge.net/p/docutils/code/8294/ + +--- docutils/nodes.py.orig 2019-04-07 08:08:41 UTC ++++ docutils/nodes.py +@@ -29,8 +29,6 @@ import warnings + import types + import unicodedata + +-import docutils.utils +- + # ============================== + # Functional Node Base Classes + # ============================== +@@ -322,6 +320,20 @@ def ensure_str(s): + return s.encode('ascii', 'backslashreplace') + return s + ++# definition moved here from `utils` to avoid circular import dependency ++def unescape(text, restore_backslashes=False, respect_whitespace=False): ++ """ ++ Return a string with nulls removed or restored to backslashes. ++ Backslash-escaped spaces are also removed. ++ """ ++ # `respect_whitespace` is ignored (since introduction 2016-12-16) ++ if restore_backslashes: ++ return text.replace('\x00', '\\') ++ else: ++ for sep in ['\x00 ', '\x00\n', '\x00']: ++ text = ''.join(text.split(sep)) ++ return text ++ + + class Text(Node, reprunicode): + +@@ -364,7 +376,7 @@ class Text(Node, reprunicode): + return domroot.createTextNode(unicode(self)) + + def astext(self): +- return reprunicode(docutils.utils.unescape(self)) ++ return reprunicode(unescape(self)) + + # Note about __unicode__: The implementation of __unicode__ here, + # and the one raising NotImplemented in the superclass Node had Added: head/textproc/py-docutils/files/patch-docutils-utils-__init__.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-docutils/files/patch-docutils-utils-__init__.py Sun Aug 4 04:31:14 2019 (r508053) @@ -0,0 +1,32 @@ +Obtained from: https://sourceforge.net/p/docutils/code/8294/ + +--- docutils/utils/__init__.py.orig 2019-04-07 08:08:42 UTC ++++ docutils/utils/__init__.py +@@ -18,6 +18,7 @@ import warnings + import unicodedata + from docutils import ApplicationError, DataError, __version_info__ + from docutils import nodes ++from docutils.nodes import unescape + import docutils.io + from docutils.utils.error_reporting import ErrorOutput, SafeString + +@@ -576,18 +577,7 @@ def escape2null(text): + parts.append('\x00' + text[found+1:found+2]) + start = found + 2 # skip character after escape + +-def unescape(text, restore_backslashes=False, respect_whitespace=False): +- """ +- Return a string with nulls removed or restored to backslashes. +- Backslash-escaped spaces are also removed. +- """ +- # `respect_whitespace` is ignored (since introduction 2016-12-16) +- if restore_backslashes: +- return text.replace('\x00', '\\') +- else: +- for sep in ['\x00 ', '\x00\n', '\x00']: +- text = ''.join(text.split(sep)) +- return text ++# `unescape` definition moved to `nodes` to avoid circular import dependency. + + def split_escaped_whitespace(text): + """