FreeBSD Bugzilla – Attachment 218825 Details for
Bug 250379
www/py-cherrypy: fails to import with lang/python38 or later
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch ported from upstream, remove contextlib2 for Python 3
py-cherrypy.patch (text/plain), 3.55 KB, created by
James French
on 2020-10-17 05:07:16 UTC
(
hide
)
Description:
Patch ported from upstream, remove contextlib2 for Python 3
Filename:
MIME Type:
Creator:
James French
Created:
2020-10-17 05:07:16 UTC
Size:
3.55 KB
patch
obsolete
>diff -urN www/py-cherrypy/Makefile www/py-cherrypy/Makefile >--- www/py-cherrypy/Makefile 2020-08-17 10:27:26.694697000 +0800 >+++ www/py-cherrypy/Makefile 2020-10-17 13:04:00.129020000 +0800 >@@ -3,6 +3,7 @@ > > PORTNAME= cherrypy > PORTVERSION= 17.4.2 >+PORTREVISION= 1 > CATEGORIES= www python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >@@ -16,19 +17,20 @@ > 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} > >+USES= python >+ >+EXAMPLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlobject>=1.5.1:databases/py-sqlobject@${PY_FLAVOR} >+EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} >+ > OPTIONS_DEFINE= EXAMPLES > > PORTEXAMPLES= * > >-USES= python > USE_PYTHON= distutils autoplist concurrent > > .include <bsd.port.options.mk> >@@ -45,15 +47,16 @@ > > .include <bsd.port.pre.mk> > >-.if ${PYTHON_REL} < 3800 >-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}contextlib2>0:devel/py-contextlib2@${PY_FLAVOR} >+.if ${PYTHON_REL} >= 3000 >+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-contextlib > .endif > > .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 >-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}more-itertools>0:devel/py-more-itertools@${PY_FLAVOR} >+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}more-itertools>0:devel/py-more-itertools@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}contextlib2>0:devel/py-contextlib2@${PY_FLAVOR} > EXAMPLES_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cheetah3>0:devel/py-cheetah3@${PY_FLAVOR} > .endif > >diff -urN www/py-cherrypy/files/extra-patch-contextlib www/py-cherrypy/files/extra-patch-contextlib >--- www/py-cherrypy/files/extra-patch-contextlib 1970-01-01 08:00:00.000000000 +0800 >+++ www/py-cherrypy/files/extra-patch-contextlib 2020-10-17 13:02:27.033824000 +0800 >@@ -0,0 +1,38 @@ >+Patches to remove contextlib2 and use contextlib from the standard library. >+Contextlib has been in the Python standard library since Python 3.2 >+Contextlib2 is a backport to Python 2 (and is supported through Python 3.7). >+ >+Patch based on upstream commit: >+https://github.com/cherrypy/cherrypy/commit/2fc78dc9af3e >+ >+--- setup.py.orig 2020-10-16 01:28:48 UTC >++++ setup.py >+@@ -66,7 +66,6 @@ params = dict( >+ 'portend>=2.1.1', >+ 'more_itertools', >+ 'zc.lockfile', >+- 'contextlib2', >+ ], >+ extras_require={ >+ 'docs': [ >+ >+--- cherrypy/lib/sessions.py.orig 2020-10-16 01:25:39 UTC >++++ cherrypy/lib/sessions.py >+@@ -109,7 +109,7 @@ import binascii >+ >+ import six >+ from six.moves import cPickle as pickle >+-import contextlib2 >++import contextlib >+ >+ import zc.lockfile >+ >+@@ -572,7 +572,7 @@ class FileSession(Session): >+ def release_lock(self, path=None): >+ """Release the lock on the currently-loaded session data.""" >+ self.lock.close() >+- with contextlib2.suppress(FileNotFoundError): >++ with contextlib.suppress(FileNotFoundError): >+ os.remove(self.lock._path) >+ self.locked = False >+
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 250379
:
218781
|
218782
|
218825
|
218826
|
218827
|
218828
|
224358