23093717 Upgrade cherrypy to 5.1.0
authorYiteng Zhang <yiteng.zhang@oracle.com>
Mon, 09 May 2016 14:33:25 -0700
changeset 5947 d9fcc08e98bf
parent 5946 e88e3336ea13
child 5948 bfd525bc0bf2
23093717 Upgrade cherrypy to 5.1.0
components/python/cherrypy/Makefile
components/python/cherrypy/patches/cp-ticket-1386.patch
components/python/cherrypy/test/results-all.master
--- a/components/python/cherrypy/Makefile	Mon May 09 12:48:33 2016 -0700
+++ b/components/python/cherrypy/Makefile	Mon May 09 14:33:25 2016 -0700
@@ -20,23 +20,23 @@
 #
 
 #
-# 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.8.0
+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:ffcdb43667d4098247efaf8c82dd36d3dd4f8e5dc768ef5e90b480899e523bea
+    sha256:5fccc9ad3bf9a1df83bbb934772f34f42571421bdd75f90f74c170b6c0ef13b1
 COMPONENT_ARCHIVE_URL=	$(call pypi_url)
 COMPONENT_BUGDB=	python-mod/cherrypy
 
-TPNO=			25174
+TPNO=			27797
 
 PATCH_LEVEL=0
 
@@ -52,6 +52,11 @@
 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)
@@ -61,10 +66,6 @@
 # test are not clean, so not appropriate to run at top level
 $(SKIP_TEST_AT_TOP_LEVEL)
 
-# The test requires some interactive selections from the users to continue,
-# otherwise it'll hang.
-# Ran 246 tests, 3 skipped, 3 failures 
-# FAIL: test_598, test_queue_full, test_2_File_Concurrency
 test:		$(TEST_NO_ARCH)
 
 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
--- a/components/python/cherrypy/patches/cp-ticket-1386.patch	Mon May 09 12:48:33 2016 -0700
+++ b/components/python/cherrypy/patches/cp-ticket-1386.patch	Mon May 09 14:33:25 2016 -0700
@@ -1,18 +1,23 @@
-# This issue has been offered to upstream but not be accepted yet.
-# Please see https://bitbucket.org/cherrypy/cherrypy/issues/1386/parse_request_uri-incorrectly-parses-uri
+# 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 ://
 
-diff -r 252fccc270d4 cherrypy/wsgiserver/wsgiserver2.py
---- cherrypy/wsgiserver/wsgiserver2.py	Tue Sep 01 12:23:22 2015 +0100
-+++ cherrypy/wsgiserver/wsgiserver2.py	Thu Oct 22 23:16:55 2015 -0700
-@@ -125,6 +125,7 @@
+--- 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
- 
- if sys.version_info >= (3, 0):
-@@ -835,15 +836,12 @@
+ import errno
+ import logging
+@@ -830,15 +831,12 @@
          if uri == ASTERISK:
              return None, None, uri
  
@@ -30,18 +35,18 @@
              return scheme, authority, path
  
          if uri.startswith(FORWARD_SLASH):
-diff -r 252fccc270d4 cherrypy/wsgiserver/wsgiserver3.py
---- cherrypy/wsgiserver/wsgiserver3.py	Tue Sep 01 12:23:22 2015 +0100
-+++ cherrypy/wsgiserver/wsgiserver3.py	Thu Oct 22 23:16:55 2015 -0700
-@@ -100,6 +100,7 @@
- import threading
- import time
- from traceback import format_exc
+--- 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
- 
- if sys.version_info >= (3, 0):
-     bytestr = bytes
-@@ -813,14 +814,13 @@
++
+ try:
+     # prefer slower Python-based io module
+     import _pyio as io
+@@ -819,14 +821,13 @@
          if uri == ASTERISK:
              return None, None, uri
  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/cherrypy/test/results-all.master	Mon May 09 14:33:25 2016 -0700
@@ -0,0 +1,15 @@
+........................................................F..........................................S..........................................S..................................................................................................
+======================================================================
+FAIL: test_queue_full (cherrypy.test.test_conn.LimitedRequestQueueTests)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "$(SOURCE_DIR)/cherrypy/test/test_conn.py", line 830, in test_queue_full
+    assert sys.platform == 'darwin'
+AssertionError: 
+-------------------- >> begin captured logging << --------------------
+--------------------- >> end captured logging << ---------------------
+
+----------------------------------------------------------------------
+Ran 241 tests in
+
+FAILED (SKIP=2, failures=1)