Index: head/www/py-cherrypy/files/patch-python38 =================================================================== --- head/www/py-cherrypy/files/patch-python38 (revision 545133) +++ head/www/py-cherrypy/files/patch-python38 (nonexistent) @@ -1,60 +0,0 @@ -https://github.com/cherrypy/cherrypy/commit/c65dc279d1d8 - ---- cherrypy/_cpcompat.py.orig 2016-05-11 00:35:35 UTC -+++ cherrypy/_cpcompat.py -@@ -357,3 +357,19 @@ class SetDaemonProperty: - - if sys.version_info < (2, 6): - daemon = property(__get_daemon, __set_daemon) -+ -+# html module come in 3.2 version -+try: -+ from html import escape -+except ImportError: -+ from cgi import escape -+ -+# html module needed the argument quote=False because in cgi the default -+# is False. With quote=True the results differ. -+ -+def escape_html(s, escape_quote=False): -+ """Replace special characters "&", "<" and ">" to HTML-safe sequences. -+ -+ When escape_quote=True, escape (') and (") chars. -+ """ -+ return escape(s, quote=escape_quote) ---- cherrypy/_cperror.py.orig 2016-05-11 00:35:35 UTC -+++ cherrypy/_cperror.py -@@ -115,9 +115,9 @@ Note that you have to explicitly set - and not simply return an error message as a result. - """ - --from cgi import escape as _escape - from sys import exc_info as _exc_info - from traceback import format_exception as _format_exception -+from cherrypy._cpcompat import escape_html - from cherrypy._cpcompat import basestring, bytestr, iteritems, ntob - from cherrypy._cpcompat import tonative, urljoin as _urljoin - from cherrypy.lib import httputil as _httputil -@@ -489,7 +489,7 @@ def get_error_page(status, **kwargs): - if v is None: - kwargs[k] = "" - else: -- kwargs[k] = _escape(kwargs[k]) -+ kwargs[k] = escape_html(kwargs[k]) - - # Use a custom template or callable for the error page? - pages = cherrypy.serving.request.error_page ---- cherrypy/test/test_compat.py.orig 2016-05-11 00:35:35 UTC -+++ cherrypy/test/test_compat.py -@@ -17,3 +17,11 @@ class StringTester(unittest.TestCase): - if compat.py3k: - raise nose.SkipTest("Only useful on Python 2") - self.assertRaises(Exception, compat.ntob, unicode('fight')) -+ -+ -+class EscapeTester(unittest.TestCase): -+ """Class to test escape_html function from _cpcompat.""" -+ -+ def test_escape_quote(self): -+ """test_escape_quote - Verify the output for &<>"' chars.""" -+ self.assertEqual("""xx&<>"aa'""", compat.escape_html("""xx&<>"aa'""")) Property changes on: head/www/py-cherrypy/files/patch-python38 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/py-cherrypy/Makefile =================================================================== --- head/www/py-cherrypy/Makefile (revision 545133) +++ head/www/py-cherrypy/Makefile (revision 545134) @@ -1,65 +1,60 @@ # Created by: Nicola Vitale # $FreeBSD$ PORTNAME= cherrypy -PORTVERSION= 5.4.0 -PORTREVISION= 4 +PORTVERSION= 17.4.2 CATEGORIES= www python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= CherryPy-${PORTVERSION} MAINTAINER= nivit@FreeBSD.org COMMENT= Pythonic, object-oriented web development framework LICENSE= BSD3CLAUSE -EXAMPLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cheetah>=2.4.4:devel/py-cheetah@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sqlobject>=1.5.1:databases/py-sqlobject@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} + +EXAMPLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlobject>=1.5.1:databases/py-sqlobject@${PY_FLAVOR} EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.11.0:devel/py-six@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cheroot>=6.2.4:www/py-cheroot@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}portend>=2.1.1:net/py-portend@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zclockfile>0:devel/py-zclockfile@${PY_FLAVOR} + OPTIONS_DEFINE= EXAMPLES PORTEXAMPLES= * -USES= python shebangfix +USES= python USE_PYTHON= distutils autoplist concurrent -SHEBANG_FILES= cherrypy/cherryd .include -# handle tutorial separately, and remove cherrypy.process from data_files -# otherwise it confuses build_py.get_outputs() and breaks PYDISTUTILS_AUTOPLIST -post-patch: - @${REINPLACE_CMD} -e '99,106d' -e '78s/"cherrypy.tutorial",//1' \ - -e '88d' -i.bak ${WRKSRC}/${PYSETUP} - .if ${PORT_OPTIONS:MEXAMPLES} post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/cherrypy/tutorial && \ ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) (cd ${STAGEDIR}${PREFIX} && \ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ -d ${EXAMPLESDIR} ${EXAMPLESDIR:S,${PREFIX}/,,}) .endif .include -.if ${PYTHON_REL} >= 3000 # devel/py-cheetah doesn't yet build with Python 3 -.undef EXAMPLES_RUN_DEPENDS +.if ${PYTHON_REL} < 3800 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}contextlib2>0:devel/py-contextlib2@${PY_FLAVOR} .endif -# The package cherrypy.wsgiserver includes both Python 2 and Python 3 modules, -# so it breaks PYDISTUTILS_AUTOPLIST. -# Instead of defining a cherrypy_build_py.get_outputs() method in setup.py -# we simply remove unwanted modules (see cherrypy_build_py() in setup.py) -post-extract: -.if ${PYTHON_REL} >= 3000 - @(cd ${WRKSRC}/cherrypy && ${RM} _cpcompat_subprocess.py && \ - cd wsgiserver && ${RM} ssl_pyopenssl.py wsgiserver2.py) +.if ${PYTHON_REL} < 3000 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}more-itertools5>0:devel/py-more-itertools5@${PY_FLAVOR} +EXAMPLES_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cheetah>=2.4.4:devel/py-cheetah@${PY_FLAVOR} .else - @${RM} ${WRKSRC}/cherrypy/wsgiserver/wsgiserver3.py +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}more-itertools>0:devel/py-more-itertools@${PY_FLAVOR} +EXAMPLES_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cheetah3>0:devel/py-cheetah3@${PY_FLAVOR} .endif .include Index: head/www/py-cherrypy/distinfo =================================================================== --- head/www/py-cherrypy/distinfo (revision 545133) +++ head/www/py-cherrypy/distinfo (revision 545134) @@ -1,3 +1,3 @@ -TIMESTAMP = 1464940005 -SHA256 (CherryPy-5.4.0.tar.gz) = bc8702099f6071ddd8b6404c110e22bb93e6a007fd9455e27f056be59a2ca801 -SIZE (CherryPy-5.4.0.tar.gz) = 435759 +TIMESTAMP = 1597378048 +SHA256 (CherryPy-17.4.2.tar.gz) = ef1619ad161f526745d4f0e4e517753d9d985814f1280e330661333d2ba05cdf +SIZE (CherryPy-17.4.2.tar.gz) = 684366