23093717 Upgrade cherrypy to 5.1.0
22067764 update CherryPy to version 3.8.0 and deliver a Python 3.x package
--- a/components/python/cherrypy/Makefile Thu Oct 20 09:30:59 2016 -0700
+++ b/components/python/cherrypy/Makefile Tue Oct 25 14:25:19 2016 -0700
@@ -18,29 +18,26 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
COMPONENT_NAME= CherryPy
-COMPONENT_VERSION= 3.1.2
+COMPONENT_VERSION= 5.1.0
COMPONENT_PROJECT_URL= http://www.cherrypy.org/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
- sha256:0dfd65507b047d54c09849e7a4b8bdd3616fa8776a5dbff7697cbf6ea1559bf6
+ sha256:5fccc9ad3bf9a1df83bbb934772f34f42571421bdd75f90f74c170b6c0ef13b1
COMPONENT_ARCHIVE_URL= http://download.cherrypy.org/cherrypy/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= python-mod/cherrypy
-TPNO= 5881
+TPNO= 27797
PATCH_LEVEL=0
-# This module is not Python 3 ready: syntax issues.
-PYTHON_VERSIONS = 2.7 2.6
-
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/setup.py.mk
include $(WS_MAKE_RULES)/ips.mk
@@ -48,12 +45,25 @@
COMPONENT_POST_INSTALL_ACTION = \
(cd $(PROTO_DIR)/usr/bin ; $(MV) cherryd cherryd$(PYTHON_VERSION))
+COMPONENT_TEST_DIR = $(SOURCE_DIR)/cherrypy/test
+COMPONENT_TEST_CMD = nosetests -s ./
+COMPONENT_TEST_ARGS =
+COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
+
+COMPONENT_TEST_TRANSFORMS += \
+ '-e "/^cherrypy./d" ' \
+ '-e "s|\(^Ran [0-9]\+ tests in\).*|\1|" '
+
# common targets
build: $(BUILD_NO_ARCH)
install: $(INSTALL_NO_ARCH)
-test: $(NO_TESTS)
+# test are not clean, so not appropriate to run at top level
+$(SKIP_TEST_AT_TOP_LEVEL)
+test: $(TEST_NO_ARCH)
+
+system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
REQUIRED_PACKAGES += system/core-os
--- a/components/python/cherrypy/cherrypy-PYVER.p5m Thu Oct 20 09:30:59 2016 -0700
+++ b/components/python/cherrypy/cherrypy-PYVER.p5m Tue Oct 25 14:25:19 2016 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri \
@@ -41,16 +41,23 @@
link path=usr/bin/cherryd target=cherryd$(PYVER) mediator=python \
mediator-version=$(PYVER)
file path=usr/bin/cherryd$(PYVER)
-file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info
+file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/PKG-INFO
+file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/SOURCES.txt
+file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/dependency_links.txt
+file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/top_level.txt
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/LICENSE.txt
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpcgifs.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/__main__.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpchecker.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpcompat.py
+$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpcompat_subprocess.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpconfig.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpdispatch.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cperror.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cplogging.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpmodpy.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpnative_server.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpreqbody.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cprequest.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpserver.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpthreadinglocal.py
@@ -59,28 +66,41 @@
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpwsgi.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpwsgi_server.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/cherryd mode=0555
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/daemon.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/favicon.ico
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/auth.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/auth_basic.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/auth_digest.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/caching.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/covercp.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/cpstats.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/cptools.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/encoding.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/gctools.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/http.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/httpauth.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/httputil.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/jsontools.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/lockfile.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/locking.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/profiler.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/safemime.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/reprconf.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/sessions.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/static.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/tidy.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/wsgiapp.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/xmlrpc.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/xmlrpcutil.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/plugins.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/servers.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/win32.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/wspbus.py
file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/__init__.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/ssl_builtin.py
+$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/ssl_pyopenssl.py
+$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/wsgiserver2.py
+$(PYTHON_3.4_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/wsgiserver3.py
+# comment this line until bug 20861272 is resolved or PYTHON_3.5_ONLY is present in ips.mk
+#$(PYTHON_3.5_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/wsgiserver3.py
#
license cherrypy.copyright license=BSD
--- a/components/python/cherrypy/cherrypy.copyright Thu Oct 20 09:30:59 2016 -0700
+++ b/components/python/cherrypy/cherrypy.copyright Tue Oct 25 14:25:19 2016 -0700
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2007, CherryPy Team ([email protected])
+Copyright (c) 2004-2015, CherryPy Team ([email protected])
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/cherrypy/patches/cp-ticket-1386.patch Tue Oct 25 14:25:19 2016 -0700
@@ -0,0 +1,66 @@
+# This issue has been offered to upstream and merged.
+# Please see https://bitbucket.org/cherrypy/cherrypy/commits/89dbd2f00b541f8f8378eaabf2caef3e932bb805
+# HG changeset patch
+# User Yiteng Zhang <[email protected]>
+# Date 1461887965 25200
+# Node ID 89dbd2f00b541f8f8378eaabf2caef3e932bb805
+# Parent ea07b29deabd28d5a10b764a1a452c876692d028
+parse_request_uri() incorrectly parses URI which contains ://
+
+--- cherrypy/wsgiserver/wsgiserver2.py
++++ cherrypy/wsgiserver/wsgiserver2.py
+@@ -92,6 +92,7 @@
+ import traceback as traceback_
+ import operator
+ from urllib import unquote
++from urlparse import urlparse
+ import warnings
+ import errno
+ import logging
+@@ -830,15 +831,12 @@
+ if uri == ASTERISK:
+ return None, None, uri
+
+- i = uri.find('://')
+- if i > 0 and QUESTION_MARK not in uri[:i]:
++ scheme, authority, path, params, query, fragment = urlparse(uri)
++ if scheme and QUESTION_MARK not in scheme:
+ # An absoluteURI.
+ # If there's a scheme (and it must be http or https), then:
+ # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query
+ # ]]
+- scheme, remainder = uri[:i].lower(), uri[i + 3:]
+- authority, path = remainder.split(FORWARD_SLASH, 1)
+- path = FORWARD_SLASH + path
+ return scheme, authority, path
+
+ if uri.startswith(FORWARD_SLASH):
+--- cherrypy/wsgiserver/wsgiserver3.py
++++ cherrypy/wsgiserver/wsgiserver3.py
+@@ -92,6 +92,8 @@
+ import traceback as traceback_
+ import errno
+ import logging
++from urllib.parse import urlparse
++
+ try:
+ # prefer slower Python-based io module
+ import _pyio as io
+@@ -819,14 +821,13 @@
+ if uri == ASTERISK:
+ return None, None, uri
+
+- scheme, sep, remainder = uri.partition(b'://')
+- if sep and QUESTION_MARK not in scheme:
++ scheme, authority, path, params, query, fragment = urlparse(uri)
++ if scheme and QUESTION_MARK not in scheme:
+ # An absoluteURI.
+ # If there's a scheme (and it must be http or https), then:
+ # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query
+ # ]]
+- authority, path_a, path_b = remainder.partition(FORWARD_SLASH)
+- return scheme.lower(), authority, path_a + path_b
++ return scheme, authority, path
+
+ if uri.startswith(FORWARD_SLASH):
+ # An abs_path.
--- a/components/python/cherrypy/patches/cp-ticket-847.patch Thu Oct 20 09:30:59 2016 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-Index: cherrypy/wsgiserver/__init__.py
-===================================================================
---- cherrypy/wsgiserver/__init__.py (revision 2459)
-+++ cherrypy/wsgiserver/__init__.py (working copy)
-@@ -291,6 +291,7 @@
- self.wsgi_app = wsgi_app
-
- self.ready = False
-+ self.started_request = False
- self.started_response = False
- self.status = ""
- self.outheaders = []
-@@ -318,6 +319,9 @@
- # (although your TCP stack might suffer for it: cf Apache's history
- # with FIN_WAIT_2).
- request_line = self.rfile.readline()
-+ # Set started_request to True so communicate() knows to send 408
-+ # from here on out.
-+ self.started_request = True
- if not request_line:
- # Force self.ready = False so the connection will close.
- self.ready = False
-@@ -1169,6 +1173,9 @@
- # This order of operations should guarantee correct pipelining.
- req.parse_request()
- if not req.ready:
-+ # Something went wrong in the parsing (and the server has
-+ # probably already made a simple response). Return and
-+ # let the conn close.
- return
-
- req.respond()
-@@ -1178,7 +1185,10 @@
- except socket.error, e:
- errnum = e.args[0]
- if errnum == 'timed out':
-- if req and not req.sent_headers:
-+ # Don't send a 408 if there is no oustanding request; only
-+ # if we're in the middle of a request.
-+ # See http://www.cherrypy.org/ticket/853
-+ if req and req.started_request and not req.sent_headers:
- req.simple_response("408 Request Timeout")
- elif errnum not in socket_errors_to_ignore:
- if req and not req.sent_headers: