FreeBSD Bugzilla – Attachment 217206 Details for
Bug 247597
www/py-cherrypy: can py-cherrypy be upated to at least 8.9.1?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update to 18.6.0
py-cherrypy.diff (text/plain), 5.21 KB, created by
James French
on 2020-08-14 03:54:20 UTC
(
hide
)
Description:
Update to 18.6.0
Filename:
MIME Type:
Creator:
James French
Created:
2020-08-14 03:54:20 UTC
Size:
5.21 KB
patch
obsolete
>diff -urN www/py-cherrypy/Makefile www/py-cherrypy/Makefile >index 1da1a09aa5fc..cc95cb8501b6 100644 >--- www/py-cherrypy/Makefile >+++ www/py-cherrypy/Makefile >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= cherrypy >-PORTVERSION= 5.4.0 >-PORTREVISION= 4 >+PORTVERSION= 18.6.0 > CATEGORIES= www python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >@@ -14,7 +13,10 @@ COMMENT= Pythonic, object-oriented web development framework > > LICENSE= BSD3CLAUSE > >-EXAMPLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cheetah>=2.4.4:devel/py-cheetah@${PY_FLAVOR} \ >+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip \ >+ ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm \ >+ >+EXAMPLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cheetah3>=2.4.4:devel/py-cheetah3@${PY_FLAVOR} \ > ${PYTHON_PKGNAMEPREFIX}sqlobject>=1.5.1:databases/py-sqlobject@${PY_FLAVOR} > EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} > >@@ -22,17 +24,16 @@ OPTIONS_DEFINE= EXAMPLES > > PORTEXAMPLES= * > >-USES= python shebangfix >+USES= python:3.5+ > USE_PYTHON= distutils autoplist concurrent >-SHEBANG_FILES= cherrypy/cherryd > > .include <bsd.port.options.mk> > > # 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} >+#post-patch: >+# @${REINPLACE_CMD} -e '99,106d' -e '78s/"cherrypy.tutorial",//1' \ >+# -e '88d' -i.bak ${WRKSRC}/${PYSETUP} > > .if ${PORT_OPTIONS:MEXAMPLES} > post-install: >@@ -46,20 +47,4 @@ post-install: > > .include <bsd.port.pre.mk> > >-.if ${PYTHON_REL} >= 3000 # devel/py-cheetah doesn't yet build with Python 3 >-.undef EXAMPLES_RUN_DEPENDS >-.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) >-.else >- @${RM} ${WRKSRC}/cherrypy/wsgiserver/wsgiserver3.py >-.endif >- > .include <bsd.port.post.mk> >diff -urN www/py-cherrypy/distinfo www/py-cherrypy/distinfo >index a70dc7e42bfc..52164af298a9 100644 >--- www/py-cherrypy/distinfo >+++ www/py-cherrypy/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1464940005 >-SHA256 (CherryPy-5.4.0.tar.gz) = bc8702099f6071ddd8b6404c110e22bb93e6a007fd9455e27f056be59a2ca801 >-SIZE (CherryPy-5.4.0.tar.gz) = 435759 >+TIMESTAMP = 1597375062 >+SHA256 (CherryPy-18.6.0.tar.gz) = 56608edd831ad00991ae585625e0206ed61cf1a0850e4b2cc48489fb2308c499 >+SIZE (CherryPy-18.6.0.tar.gz) = 686804 >diff -urN www/py-cherrypy/files/patch-python38 www/py-cherrypy/files/patch-python38 >deleted file mode 100644 >index 6771b87b1bd4..000000000000 >--- www/py-cherrypy/files/patch-python38 >+++ /dev/null >@@ -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'"""))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247597
:
217206
|
217207