diff --git a/setup.py b/setup.py index f1811f3..1f3eb21 100644 --- a/setup.py +++ b/setup.py @@ -44,16 +44,15 @@ def read(*rnames): "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Natural Language :: English", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Plone", - "Framework :: Zope", "Framework :: Zope :: 2", "Framework :: Zope :: 3", + "Framework :: Zope :: 4", ], keywords="zpt template zope", url="https://github.com/zopefoundation/z3c.ptcompat", diff --git a/tools/update.py b/tools/update.py index 7ff27f3..1852631 100755 --- a/tools/update.py +++ b/tools/update.py @@ -124,7 +124,8 @@ def main(options, args): output, err = proc.communicate("\n".join(diffs) + "\n") if proc.returncode != 0: - map(status, output.split("\n")) + for line in output.split("\n"): + status(line) status("An error occurred while applying patches.") break else: @@ -145,13 +146,12 @@ def create_diff(filename): new = exp.sub(replacement, new) if original != new: - return "\n".join( - map( - str.rstrip, - difflib.unified_diff( - original.split("\n"), new.split("\n"), filename, filename - ), - ) + return ''.join( + difflib.unified_diff( + original.splitlines(True), + new.splitlines(True), + filename, + filename) )