22332010 upgrade Python to 3.5.1
authorJohn Beck <John.Beck@Oracle.COM>
Mon, 07 Dec 2015 13:19:23 -0800
changeset 5184 6c2a9525f3a4
parent 5183 3a048793fc91
child 5185 c1399f35fe8a
22332010 upgrade Python to 3.5.1
components/python/python35/Makefile
components/python/python35/patches/00-dtrace.patch
components/python/python35/patches/01-bits.patch
components/python/python35/patches/05-studio-profile.patch
components/python/python35/patches/07-ucred.patch
components/python/python35/patches/08-dlpi.patch
components/python/python35/patches/10-rbac.patch
components/python/python35/patches/11-closerange.patch
components/python/python35/patches/12-py_db.patch
components/python/python35/patches/14-ossaudiodev.patch
components/python/python35/patches/19-SOABI.patch
components/python/python35/patches/20-disable-sslv3.patch
components/python/python35/patches/22-disable-test_gdb.patch
components/python/python35/patches/26-getrandom.patch
components/python/python35/patches/27-getrandom.patch
components/python/python35/python-35.p5m
--- a/components/python/python35/Makefile	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/Makefile	Mon Dec 07 13:19:23 2015 -0800
@@ -26,17 +26,17 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		Python
-COMPONENT_VERSION=	3.5.0
+COMPONENT_VERSION=	3.5.1
 COMPONENT_PROJECT_URL=	http://python.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:d6d7aa1634a5eeeca6ed4fca266982a04f84bd8f3945a9179e20b24ad2e2be91
-COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/3.5.0/$(COMPONENT_ARCHIVE)
+    sha256:c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9
+COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_SIG_URL=	$(COMPONENT_ARCHIVE_URL).asc
 COMPONENT_BUGDB=	utility/python
 
-TPNO=			24524
+TPNO=			25978
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
--- a/components/python/python35/patches/00-dtrace.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/00-dtrace.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -1013,7 +1013,7 @@
 +
 --- Python-3.5.0a4/Lib/test/test_sys.py.~1~	2015-04-20 00:37:52.000000000 -0700
 +++ Python-3.5.0a4/Lib/test/test_sys.py	2015-04-20 12:38:22.235939749 -0700
-@@ -829,6 +829,7 @@
+@@ -868,6 +868,7 @@
          self.assertEqual(sys.getsizeof(True, -1), size('') + self.longdigit)
  
      def test_objecttypes(self):
@@ -1021,7 +1021,7 @@
          # check all types defined in Objects/
          size = test.support.calcobjsize
          vsize = test.support.calcvobjsize
-@@ -857,13 +858,17 @@
+@@ -896,13 +897,17 @@
              return inner
          check(get_cell().__closure__[0], size('P'))
          # code
@@ -1042,9 +1042,9 @@
          # complex
          check(complex(0,1), size('2d'))
          # method_descriptor (descriptor object)
---- Python-3.5.0rc2/Makefile.pre.in.~1~	2015-08-25 10:19:13.000000000 -0700
-+++ Python-3.5.0rc2/Makefile.pre.in	2015-09-02 11:27:31.510492090 -0700
-@@ -52,6 +52,13 @@
+--- Python-3.5.1rc1/Makefile.pre.in.~1~	2015-11-22 22:19:07.000000000 -0800
++++ Python-3.5.1rc1/Makefile.pre.in	2015-12-04 07:32:55.999196503 -0800
+@@ -57,6 +57,13 @@
  # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  LN=		@LN@
  
@@ -1058,7 +1058,7 @@
  # Portable install script (configure doesn't always guess right)
  INSTALL=	@INSTALL@
  INSTALL_PROGRAM=@INSTALL_PROGRAM@
-@@ -596,7 +603,7 @@
+@@ -611,7 +618,7 @@
  	$(AR) $(ARFLAGS) $@ $(MODOBJS)
  	$(RANLIB) $@
  
@@ -1067,7 +1067,7 @@
  	if test $(INSTSONAME) != $(LDLIBRARY); then \
  		$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  		$(LN) -f $(INSTSONAME) $@; \
-@@ -607,9 +614,8 @@
+@@ -622,9 +629,8 @@
  libpython3.so:	libpython$(LDVERSION).so
  	$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
  
@@ -1079,7 +1079,7 @@
  
  libpython$(VERSION).sl: $(LIBRARY_OBJS)
  	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
-@@ -714,12 +720,18 @@
+@@ -729,12 +735,18 @@
  		$(MODULE_OBJS) \
  		$(SIGNAL_OBJS) \
  		$(MODOBJS) \
@@ -1098,7 +1098,7 @@
  
  Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  	$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
-@@ -853,6 +865,46 @@
+@@ -868,6 +880,46 @@
  Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
  	$(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
  
@@ -1145,7 +1145,7 @@
  ############################################################################
  # Header files
  
-@@ -1567,6 +1619,11 @@
+@@ -1582,6 +1634,11 @@
  	find build -name '*.py[co]' -exec rm -f {} ';' || true
  	-rm -f pybuilddir.txt
  	-rm -f Lib/lib2to3/*Grammar*.pickle
@@ -1155,9 +1155,9 @@
 +	rm -f Modules/gcmodule.o.ts_dtrace
 +	rm -f Objects/typeobject.o.ts_dtrace
  	-rm -f Programs/_testembed Programs/_freeze_importlib
+ 	-rm -rf build
  
- profile-removal:
-@@ -1598,6 +1655,11 @@
+@@ -1615,6 +1672,11 @@
  				     -o -name '*.orig' -o -name '*.rej' \
  				     -o -name '*.bak' ')' \
  				     -exec rm -f {} ';'
@@ -1619,7 +1619,7 @@
          switch (opcode) {
  
          /* BEWARE!
-@@ -3569,6 +3644,10 @@
+@@ -3573,6 +3648,10 @@
  
      /* pop frame */
  exit_eval_frame:
@@ -1630,7 +1630,7 @@
      Py_LeaveRecursiveCall();
      f->f_executing = 0;
      tstate->frame = f->f_back;
-@@ -4319,6 +4398,57 @@
+@@ -4323,6 +4402,57 @@
      return result;
  }
  
@@ -1688,7 +1688,7 @@
  PyObject *
  _PyEval_CallTracing(PyObject *func, PyObject *args)
  {
-@@ -4336,6 +4466,51 @@
+@@ -4340,6 +4470,51 @@
      return result;
  }
  
@@ -1754,7 +1754,7 @@
  THREADOBJ
  LDLAST
  USE_THREAD_MODULE
-@@ -818,6 +823,7 @@
+@@ -824,6 +829,7 @@
  with_tsc
  with_pymalloc
  with_valgrind
@@ -1762,7 +1762,7 @@
  with_fpectl
  with_libm
  with_libc
-@@ -1506,6 +1512,7 @@
+@@ -1512,6 +1518,7 @@
    --with(out)-tsc         enable/disable timestamp counter profile
    --with(out)-pymalloc    disable/enable specialized mallocs
    --with-valgrind         Enable Valgrind support
@@ -1770,7 +1770,7 @@
    --with-fpectl           enable SIGFPE catching
    --with-libm=STRING      math library
    --with-libc=STRING      C library
-@@ -10786,6 +10793,174 @@
+@@ -10866,6 +10873,174 @@
      OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
  fi
  
@@ -1947,7 +1947,7 @@
  DLINCLDIR=.
 --- Python-3.5.0a4/configure.ac.~1~	2015-04-20 00:37:53.000000000 -0700
 +++ Python-3.5.0a4/configure.ac	2015-04-20 12:59:58.383305870 -0700
-@@ -3086,6 +3086,62 @@
+@@ -3129,6 +3129,62 @@
      OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
  fi
  
@@ -2012,7 +2012,7 @@
  DLINCLDIR=.
 --- Python-3.5.0a4/pyconfig.h.in.~1~	2015-04-20 00:37:53.000000000 -0700
 +++ Python-3.5.0a4/pyconfig.h.in	2015-04-20 13:00:52.054987861 -0700
-@@ -1355,6 +1355,9 @@
+@@ -1358,6 +1358,9 @@
  /* Define if you want documentation strings in extension modules */
  #undef WITH_DOC_STRINGS
  
--- a/components/python/python35/patches/01-bits.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/01-bits.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -13,7 +13,7 @@
  
  AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
  
-@@ -2302,12 +2302,6 @@
+@@ -2345,12 +2345,6 @@
  if test -z "$CCSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
--- a/components/python/python35/patches/05-studio-profile.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/05-studio-profile.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -4,23 +4,22 @@
 that the profiling options be used at all steps of the build -- not just
 compilation.  As it is Solaris-specific, it is not suitable for upstream.
 
---- Python-3.5.0rc2/Makefile.pre.in.~2~	2015-09-02 11:35:43.321886346 -0700
-+++ Python-3.5.0rc2/Makefile.pre.in	2015-09-02 11:35:43.430843102 -0700
-@@ -488,30 +488,39 @@
- profile-opt:
- 	@echo "Building with support for profile generation:"
- 	$(MAKE) clean
-+	$(MAKE) profile-removal
- 	$(MAKE) build_all_generate_profile
- 	@echo "Running benchmark to generate profile data:"
--	$(MAKE) profile-removal
- 	$(MAKE) run_profile_task
- 	@echo "Rebuilding with profile guided optimizations:"
- 	$(MAKE) clean
- 	$(MAKE) build_all_use_profile
+--- Python-3.5.1rc1/Makefile.pre.in.~2~	2015-12-04 07:50:01.643727127 -0800
++++ Python-3.5.1rc1/Makefile.pre.in	2015-12-04 07:52:18.287953768 -0800
+@@ -238,7 +238,7 @@
+ TCLTK_LIBS=	@TCLTK_LIBS@
+ 
+ # The task to run while instrument when building the profile-opt target
+-PROFILE_TASK=-m test.regrtest --pgo
++PROFILE_TASK=	$(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
+ 
+ # report files for gcov / lcov coverage report
+ COVERAGE_INFO=	$(abs_builddir)/coverage.info
+@@ -509,24 +509,33 @@
+ 	$(MAKE) profile-removal
  
  build_all_generate_profile:
--	$(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-generate" LDFLAGS="-fprofile-generate" LIBS="$(LIBS) -lgcov"
+-	$(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
 +	$(MAKE) all CC="$(CC) -xprofile=collect:$(XPROFILE_DIR)" \
 +	    CFLAGS_NODIST="$(CFLAGS) -xprofile=collect:$(XPROFILE_DIR)" \
 +	    LDFLAGS="$(LDFLAGS) -xprofile=collect:$(XPROFILE_DIR)" \
@@ -28,11 +27,14 @@
  
  run_profile_task:
  	: # FIXME: can't run for a cross build
--	$(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
+-	$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
 +	LD_LIBRARY_PATH=. $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
  
+ build_all_merge_profile:
+ 	$(LLVM_PROF_MERGER)
+ 
  build_all_use_profile:
--	$(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-use -fprofile-correction"
+-	$(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG)"
 +	$(MAKE) all CC="$(CC) -xprofile=use:$(XPROFILE_DIR)" \
 +	    CFLAGS_NODIST="$(CFLAGS) -xprofile=use:$(XPROFILE_DIR)" \
 +	    LDFLAGS="$(LDFLAGS) -xprofile=use:$(XPROFILE_DIR)" \
@@ -51,7 +53,7 @@
  
  coverage-lcov:
  	@echo "Creating Coverage HTML report with LCOV:"
-@@ -583,13 +592,9 @@
+@@ -598,13 +607,9 @@
  # -s, --silent or --quiet is always the first char.
  # Under BSD make, MAKEFLAGS might be " -s -v x=y".
  sharedmods: $(BUILDPYTHON) pybuilddir.txt
@@ -66,11 +68,12 @@
  
  # Build static library
  # avoid long command lines, same as LIBRARY_OBJS
-@@ -1627,7 +1632,7 @@
- 	-rm -f Programs/_testembed Programs/_freeze_importlib
+@@ -1643,8 +1648,7 @@
+ 	-rm -rf build
  
  profile-removal:
 -	find . -name '*.gc??' -exec rm -f {} ';'
+-	find . -name '*.profclang?' -exec rm -f {} ';'
 +	find . -name '*profile' -exec rm -f {} ';'
  	rm -f $(COVERAGE_INFO)
  	rm -rf $(COVERAGE_REPORT)
--- a/components/python/python35/patches/07-ucred.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/07-ucred.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -412,7 +412,7 @@
 +}
 --- Python-3.5.0a4/setup.py.~3~	2015-04-20 13:25:43.044301257 -0700
 +++ Python-3.5.0a4/setup.py	2015-04-20 13:25:43.100051905 -0700
-@@ -1532,6 +1532,13 @@
+@@ -1533,6 +1533,13 @@
          # Stefan Krah's _decimal module
          exts.append(self._decimal_ext())
  
--- a/components/python/python35/patches/08-dlpi.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/08-dlpi.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -1225,7 +1225,7 @@
 +}
 --- Python-3.5.0a4/setup.py.~4~	2015-04-20 13:28:29.633806027 -0700
 +++ Python-3.5.0a4/setup.py	2015-04-20 13:28:29.649896175 -0700
-@@ -1539,6 +1539,12 @@
+@@ -1540,6 +1540,12 @@
              exts.append( Extension('ucred', ['ucred.c'],
                                     libraries = ['tsol']) )
  
--- a/components/python/python35/patches/10-rbac.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/10-rbac.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -1285,7 +1285,7 @@
 +};
 --- Python-3.5.0a4/setup.py.~5~	2015-04-20 13:30:08.410768276 -0700
 +++ Python-3.5.0a4/setup.py	2015-04-20 13:30:08.438983714 -0700
-@@ -1545,6 +1545,22 @@
+@@ -1546,6 +1546,22 @@
              exts.append( Extension('dlpi', ['dlpimodule.c'],
                                     libraries = ['dlpi']) )
  
--- a/components/python/python35/patches/11-closerange.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/11-closerange.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -3,7 +3,7 @@
 
 --- Python-3.5.0rc2/Modules/posixmodule.c.~1~	2015-08-25 10:19:14.000000000 -0700
 +++ Python-3.5.0rc2/Modules/posixmodule.c	2015-09-02 12:31:54.885953202 -0700
-@@ -7781,6 +7781,19 @@
+@@ -7777,6 +7777,19 @@
      Py_RETURN_NONE;
  }
  
@@ -23,7 +23,7 @@
  
  /*[clinic input]
  os.closerange
-@@ -7797,11 +7810,13 @@
+@@ -7793,11 +7806,13 @@
  /*[clinic end generated code: output=70e6adb95220ba96 input=5855a3d053ebd4ec]*/
  {
      int i;
--- a/components/python/python35/patches/12-py_db.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/12-py_db.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -1,18 +1,18 @@
 This patch adds Python debugger support.  It may be contributed upstream at
 some point, but the suitability (or lack thereof) has not yet been determined.
 
---- Python-3.5.0rc2/Makefile.pre.in.~3~	2015-09-02 12:32:56.683992213 -0700
-+++ Python-3.5.0rc2/Makefile.pre.in	2015-09-02 12:32:56.824907825 -0700
-@@ -482,7 +482,7 @@
+--- Python-3.5.1rc1/Makefile.pre.in.~3~	2015-12-04 07:55:35.437372222 -0800
++++ Python-3.5.1rc1/Makefile.pre.in	2015-12-04 07:55:35.539445506 -0800
+@@ -486,7 +486,7 @@
  
  # Default target
  all:		build_all
 -build_all:	$(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config
 +build_all:	$(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config build-py_db
  
- # Compile a binary with gcc profile guided optimization.
+ # Compile a binary with profile guided optimization.
  profile-opt:
-@@ -685,6 +685,15 @@
+@@ -700,6 +700,15 @@
  	@mv config.c Modules
  	@echo "The Makefile was updated, you may need to re-run make."
  
@@ -28,7 +28,7 @@
  
  Modules/Setup: $(srcdir)/Modules/Setup.dist
  	@if test -f Modules/Setup; then \
-@@ -1062,7 +1071,7 @@
+@@ -1077,7 +1086,7 @@
  		$(TESTRUNNER) $(QUICKTESTOPTS)
  
  
--- a/components/python/python35/patches/14-ossaudiodev.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/14-ossaudiodev.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -4,7 +4,7 @@
 
 --- Python-3.5.0a4/setup.py.~6~	2015-04-20 13:49:47.441303130 -0700
 +++ Python-3.5.0a4/setup.py	2015-04-20 13:49:47.506430752 -0700
-@@ -1616,7 +1616,7 @@
+@@ -1617,7 +1617,7 @@
          # End multiprocessing
  
          # Platform-specific libraries
--- a/components/python/python35/patches/19-SOABI.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/19-SOABI.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -3,7 +3,7 @@
 
 --- Python-3.5.0a4/configure.ac.~3~	2015-04-20 14:10:42.056744800 -0700
 +++ Python-3.5.0a4/configure.ac	2015-04-20 14:10:42.275328447 -0700
-@@ -4369,7 +4369,7 @@
+@@ -4412,7 +4412,7 @@
  
  AC_SUBST(EXT_SUFFIX)
  case $ac_sys_system in
--- a/components/python/python35/patches/20-disable-sslv3.patch	Mon Dec 07 13:01:04 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-This patch comes from in-house.  It has not yet been submitted upstream,
-but submission is planned.
-
---- Python-3.5.0rc2/Modules/_ssl.c.~1~	2015-08-25 10:19:14.000000000 -0700
-+++ Python-3.5.0rc2/Modules/_ssl.c	2015-09-02 12:37:20.276035208 -0700
-@@ -2281,6 +2281,8 @@
-     options = SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
-     if (proto_version != PY_SSL_VERSION_SSL2)
-         options |= SSL_OP_NO_SSLv2;
-+    if (proto_version != PY_SSL_VERSION_SSL3)
-+        options |= SSL_OP_NO_SSLv3;
-     SSL_CTX_set_options(self->ctx, options);
- 
- #ifndef OPENSSL_NO_ECDH
---- Python-3.5.0a4/Lib/test/test_ssl.py.~1~	2015-04-20 00:37:52.000000000 -0700
-+++ Python-3.5.0a4/Lib/test/test_ssl.py	2015-04-20 14:13:10.974024879 -0700
-@@ -784,10 +784,7 @@
-     @skip_if_broken_ubuntu_ssl
-     def test_options(self):
-         ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
--        # OP_ALL | OP_NO_SSLv2 is the default value
--        self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2,
--                         ctx.options)
--        ctx.options |= ssl.OP_NO_SSLv3
-+        # OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value
-         self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3,
-                          ctx.options)
-         if can_clear_options():
-@@ -2451,17 +2448,17 @@
-                             " SSL2 client to SSL23 server test unexpectedly failed:\n %s\n"
-                             % str(x))
-             if hasattr(ssl, 'PROTOCOL_SSLv3'):
--                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3')
-+                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False)
-             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
-             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
- 
-             if hasattr(ssl, 'PROTOCOL_SSLv3'):
--                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_OPTIONAL)
-+                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_OPTIONAL)
-             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL)
-             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
- 
-             if hasattr(ssl, 'PROTOCOL_SSLv3'):
--                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_REQUIRED)
-+                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_REQUIRED)
-             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED)
-             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
- 
-@@ -2493,7 +2490,8 @@
-             try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
-             if no_sslv2_implies_sslv3_hello():
-                 # No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
--                try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, 'SSLv3',
-+                # until we disabled SSLv3 for Poodle
-+                try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False,
-                                    client_options=ssl.OP_NO_SSLv2)
- 
-         @skip_if_broken_ubuntu_ssl
--- a/components/python/python35/patches/22-disable-test_gdb.patch	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/patches/22-disable-test_gdb.patch	Mon Dec 07 13:19:23 2015 -0800
@@ -2,12 +2,12 @@
 from the version history why these lines were dropped in version 3.  The
 patch has not yet been submitted upstream, but submission is planned.
 
---- Python-3.4.2/Lib/test/test_gdb.py.~1~	2014-10-08 01:18:13.000000000 -0700
-+++ Python-3.4.2/Lib/test/test_gdb.py	2015-02-06 16:00:58.802170301 -0800
-@@ -34,6 +34,8 @@
- if gdb_major_version < 7:
-     raise unittest.SkipTest("gdb versions before 7.0 didn't support python embedding"
-                             " Saw:\n" + gdb_version.decode('ascii', 'replace'))
+--- Python-3.5.1rc1/Lib/test/test_gdb.py.~1~	2015-12-04 08:05:05.566320671 -0800
++++ Python-3.5.1rc1/Lib/test/test_gdb.py	2015-12-04 08:09:12.755287204 -0800
+@@ -49,6 +49,8 @@
+                             "embedding. Saw %s.%s:\n%s"
+                             % (gdb_major_version, gdb_minor_version,
+                                gdb_version))
 +if sys.platform.startswith("sunos"):
 +    raise unittest.SkipTest("test doesn't work very well on Solaris")
  
--- a/components/python/python35/patches/26-getrandom.patch	Mon Dec 07 13:01:04 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-This patch was originated in-house.  It is to work around a bug (21825650)
-in getrandom(2).  Once that bug is fixed, the patch should be removable.
-Upstream has been informed.
-
---- Python-3.5.0rc2/Python/random.c.~1~	2015-08-25 10:19:14.000000000 -0700
-+++ Python-3.5.0rc2/Python/random.c	2015-09-02 14:18:51.799090171 -0700
-@@ -136,7 +136,7 @@
-         }
- 
-         if (n < 0) {
--            if (errno == ENOSYS) {
-+            if (errno == ENOSYS || errno == EINVAL) {
-                 getrandom_works = 0;
-                 return 0;
-             }
--- a/components/python/python35/patches/27-getrandom.patch	Mon Dec 07 13:01:04 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-This patch comes from upstream: http://bugs.python.org/issue25003
-
---- a/configure	Fri Sep 11 12:38:27 2015 +0200
-+++ b/configure	Fri Sep 11 13:06:42 2015 +0200
-@@ -16180,11 +16180,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
-     #include <sys/syscall.h>
- 
-     int main() {
-+        char buffer[1];
-+        const size_t buflen = sizeof(buffer);
-         const int flags = 0;
--        char buffer[1];
--        int n;
-         /* ignore the result, Python checks for ENOSYS at runtime */
--        (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
-+        (void)syscall(SYS_getrandom, buffer, buflen, flags);
-         return 0;
-     }
- 
-@@ -16206,6 +16206,43 @@ if test "$have_getrandom_syscall" = yes;
- 
- fi
- 
-+# check if the getrandom() function is available
-+# the test was written for the Solaris function of <sys/random.h>
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
-+$as_echo_n "checking for the getrandom() function... " >&6; }
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+
-+    #include <sys/random.h>
-+
-+    int main() {
-+        char buffer[1];
-+        const size_t buflen = sizeof(buffer);
-+        const int flags = 0;
-+        /* ignore the result, Python checks for ENOSYS at runtime */
-+        (void)getrandom(buffer, buflen, flags);
-+        return 0;
-+    }
-+
-+
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  have_getrandom=yes
-+else
-+  have_getrandom=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
-+$as_echo "$have_getrandom" >&6; }
-+
-+if test "$have_getrandom" = yes; then
-+
-+$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
-+
-+fi
-+
- # generate output files
- ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
- 
---- a/configure.ac	Fri Sep 11 12:38:27 2015 +0200
-+++ b/configure.ac	Fri Sep 11 13:06:42 2015 +0200
-@@ -5161,11 +5161,11 @@ AC_LINK_IFELSE(
-     #include <sys/syscall.h>
- 
-     int main() {
-+        char buffer[1];
-+        const size_t buflen = sizeof(buffer);
-         const int flags = 0;
--        char buffer[1];
--        int n;
-         /* ignore the result, Python checks for ENOSYS at runtime */
--        (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
-+        (void)syscall(SYS_getrandom, buffer, buflen, flags);
-         return 0;
-     }
-   ]])
-@@ -5177,6 +5177,31 @@ if test "$have_getrandom_syscall" = yes;
-               [Define to 1 if the Linux getrandom() syscall is available])
- fi
- 
-+# check if the getrandom() function is available
-+# the test was written for the Solaris function of <sys/random.h>
-+AC_MSG_CHECKING(for the getrandom() function)
-+AC_LINK_IFELSE(
-+[
-+  AC_LANG_SOURCE([[
-+    #include <sys/random.h>
-+
-+    int main() {
-+        char buffer[1];
-+        const size_t buflen = sizeof(buffer);
-+        const int flags = 0;
-+        /* ignore the result, Python checks for ENOSYS at runtime */
-+        (void)getrandom(buffer, buflen, flags);
-+        return 0;
-+    }
-+  ]])
-+],[have_getrandom=yes],[have_getrandom=no])
-+AC_MSG_RESULT($have_getrandom)
-+
-+if test "$have_getrandom" = yes; then
-+    AC_DEFINE(HAVE_GETRANDOM, 1,
-+              [Define to 1 if the getrandom() function is available])
-+fi
-+
- # generate output files
- AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
---- Python-3.5.0/Lib/test/test_os.py.~1~	2015-09-13 04:41:23.000000000 -0700
-+++ Python-3.5.0/Lib/test/test_os.py	2015-09-14 13:43:47.884863398 -0700
-@@ -1213,13 +1213,17 @@
-         self.assertNotEqual(data1, data2)
- 
- 
--HAVE_GETENTROPY = (sysconfig.get_config_var('HAVE_GETENTROPY') == 1)
--HAVE_GETRANDOM = (sysconfig.get_config_var('HAVE_GETRANDOM_SYSCALL') == 1)
-+USE_GETENTROPY = ((sysconfig.get_config_var('HAVE_GETENTROPY') == 1)
-+                  and not sys.platform.startswith("sunos"))
-+HAVE_GETRANDOM = (sysconfig.get_config_var('HAVE_GETRANDOM') == 1)
-+HAVE_GETRANDOM_SYSCALL = (sysconfig.get_config_var('HAVE_GETRANDOM_SYSCALL') == 1)
- 
[email protected](HAVE_GETENTROPY,
[email protected](USE_GETENTROPY,
-                  "getentropy() does not use a file descriptor")
- @unittest.skipIf(HAVE_GETRANDOM,
-                  "getrandom() does not use a file descriptor")
[email protected](HAVE_GETRANDOM_SYSCALL,
-+                 "getrandom() does not use a file descriptor")
- class URandomFDTests(unittest.TestCase):
-     @unittest.skipUnless(resource, "test requires the resource module")
-     def test_urandom_failure(self):
---- Python-3.5.0/Python/random.c.~2~	2015-09-14 14:11:43.377801246 -0700
-+++ Python-3.5.0/Python/random.c	2015-09-14 14:19:35.124606276 -0700
-@@ -6,11 +6,20 @@
- #  ifdef HAVE_SYS_STAT_H
- #    include <sys/stat.h>
- #  endif
--#  ifdef HAVE_GETRANDOM_SYSCALL
-+#  ifdef HAVE_GETRANDOM
-+#    include <sys/random.h>
-+#  elif defined(HAVE_GETRANDOM_SYSCALL)
- #    include <sys/syscall.h>
- #  endif
- #endif
- 
-+/* Solaris 11.3 provides getrandom() and getentropy(). getentropy() cannot be
-+   used for os.urandom() because it is blocking, it. Use
-+   getrandom(GRND_NONBLOCK) instead, it is non-blocking. */
-+#if defined(HAVE_GETENTROPY) && !defined(sun)
-+#  define USE_GETENTROPY
-+#endif
-+
- #ifdef Py_DEBUG
- int _Py_HashSecret_Initialized = 0;
- #else
-@@ -70,7 +79,7 @@
-     return 0;
- }
- 
--#elif HAVE_GETENTROPY
-+#elif defined(USE_GETENTROPY)
- /* Fill buffer with size pseudo-random bytes generated by getentropy().
-    Return 0 on success, or raise an exception and return -1 on error.
- 
-@@ -105,16 +114,19 @@
-     return 0;
- }
- 
--#else   /* !HAVE_GETENTROPY */
-+#else   /* !USE_GETENTROPY */
-+
-+#if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL)
-+#define PY_GETRANDOM
- 
--#ifdef HAVE_GETRANDOM_SYSCALL
- static int
- py_getrandom(void *buffer, Py_ssize_t size, int raise)
- {
--    /* is getrandom() supported by the running kernel?
--     * need Linux kernel 3.17 or later */
-+    /* Is getrandom() supported by the running kernel?
-+     * Need Linux kernel 3.17 or newer, or Solaris 11.3 or newer */
-     static int getrandom_works = 1;
--    /* Use /dev/urandom, block if the kernel has no entropy */
-+    /* Use non-blocking /dev/urandom device. On Linux at boot, the getrandom()
-+     * syscall blocks until /dev/urandom is initialized with enough entropy. */
-     const int flags = 0;
-     int n;
- 
-@@ -124,7 +136,18 @@
-     while (0 < size) {
-         errno = 0;
- 
--        /* Use syscall() because the libc doesn't expose getrandom() yet, see:
-+#ifdef HAVE_GETRANDOM
-+        if (raise) {
-+            Py_BEGIN_ALLOW_THREADS
-+            n = getrandom(buffer, size, flags);
-+            Py_END_ALLOW_THREADS
-+        }
-+        else {
-+            n = getrandom(buffer, size, flags);
-+        }
-+#else
-+        /* On Linux, use the syscall() function because the GNU libc doesn't
-+         * expose the Linux getrandom() syscall yet. See:
-          * https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
-         if (raise) {
-             Py_BEGIN_ALLOW_THREADS
-@@ -134,6 +157,7 @@
-         else {
-             n = syscall(SYS_getrandom, buffer, size, flags);
-         }
-+#endif
- 
-         if (n < 0) {
-             if (errno == ENOSYS || errno == EINVAL) {
-@@ -182,7 +206,7 @@
- 
-     assert (0 < size);
- 
--#ifdef HAVE_GETRANDOM_SYSCALL
-+#ifdef PY_GETRANDOM
-     if (py_getrandom(buffer, size, 0) == 1)
-         return;
-     /* getrandom() is not supported by the running kernel, fall back
-@@ -218,14 +242,14 @@
-     int fd;
-     Py_ssize_t n;
-     struct _Py_stat_struct st;
--#ifdef HAVE_GETRANDOM_SYSCALL
-+#ifdef PY_GETRANDOM
-     int res;
- #endif
- 
-     if (size <= 0)
-         return 0;
- 
--#ifdef HAVE_GETRANDOM_SYSCALL
-+#ifdef PY_GETRANDOM
-     res = py_getrandom(buffer, size, 1);
-     if (res < 0)
-         return -1;
-@@ -304,7 +328,7 @@
-     }
- }
- 
--#endif /* HAVE_GETENTROPY */
-+#endif
- 
- /* Fill buffer with pseudo-random bytes generated by a linear congruent
-    generator (LCG):
-@@ -345,7 +369,7 @@
- 
- #ifdef MS_WINDOWS
-     return win32_urandom((unsigned char *)buffer, size, 1);
--#elif HAVE_GETENTROPY
-+#elif defined(USE_GETENTROPY)
-     return py_getentropy(buffer, size, 0);
- #else
-     return dev_urandom_python((char*)buffer, size);
-@@ -392,7 +416,7 @@
-     else {
- #ifdef MS_WINDOWS
-         (void)win32_urandom(secret, secret_size, 0);
--#elif HAVE_GETENTROPY
-+#elif defined(USE_GETENTROPY)
-         (void)py_getentropy(secret, secret_size, 1);
- #else
-         dev_urandom_noraise(secret, secret_size);
-@@ -408,7 +432,7 @@
-         CryptReleaseContext(hCryptProv, 0);
-         hCryptProv = 0;
-     }
--#elif HAVE_GETENTROPY
-+#elif defined(USE_GETENTROPY)
-     /* nothing to clean */
- #else
-     dev_urandom_close();
---- a/pyconfig.h.in	Fri Sep 11 12:38:27 2015 +0200
-+++ b/pyconfig.h.in	Fri Sep 11 13:06:42 2015 +0200
-@@ -395,6 +395,9 @@
- /* Define to 1 if you have the `getpwent' function. */
- #undef HAVE_GETPWENT
- 
-+/* Define to 1 if the getrandom() function is available */
-+#undef HAVE_GETRANDOM
-+
- /* Define to 1 if the Linux getrandom() syscall is available */
- #undef HAVE_GETRANDOM_SYSCALL
- 
--- a/components/python/python35/python-35.p5m	Mon Dec 07 13:01:04 2015 -0800
+++ b/components/python/python35/python-35.p5m	Mon Dec 07 13:19:23 2015 -0800
@@ -35,7 +35,7 @@
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
 <transform file path=.*/(idle_)?tests?/.* -> default facet.optional.test true>
 set name=pkg.fmri \
-    value=pkg:/runtime/python-35@$(COMPONENT_VERSION),$(BUILD_VERSION)
+    value=pkg:/runtime/python-35@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="The Python interpreter, libraries and utilities"
 set name=com.oracle.info.description value="Python 3.5"
 set name=com.oracle.info.tpno value=$(TPNO)
@@ -710,6 +710,8 @@
 file path=usr/lib/python3.5/idlelib/configSectionNameDialog.py
 file path=usr/lib/python3.5/idlelib/dynOptionMenuWidget.py
 file path=usr/lib/python3.5/idlelib/extend.txt
+file path=usr/lib/python3.5/idlelib/help.html
+file path=usr/lib/python3.5/idlelib/help.py
 file path=usr/lib/python3.5/idlelib/help.txt
 file path=usr/lib/python3.5/idlelib/idle.bat
 file path=usr/lib/python3.5/idlelib/idle.py
@@ -832,10 +834,10 @@
 file path=usr/lib/python3.5/lib-dynload/unicodedata.cpython-35m.so
 file path=usr/lib/python3.5/lib-dynload/xxlimited.cpython-35m.so
 file path=usr/lib/python3.5/lib-dynload/zlib.cpython-35m.so
+file path=usr/lib/python3.5/lib2to3/Grammar$(COMPONENT_VERSION).final.0.pickle
 file path=usr/lib/python3.5/lib2to3/Grammar.txt
-file path=usr/lib/python3.5/lib2to3/Grammar3.5.0.final.0.pickle
+file path=usr/lib/python3.5/lib2to3/PatternGrammar$(COMPONENT_VERSION).final.0.pickle
 file path=usr/lib/python3.5/lib2to3/PatternGrammar.txt
-file path=usr/lib/python3.5/lib2to3/PatternGrammar3.5.0.final.0.pickle
 file path=usr/lib/python3.5/lib2to3/__init__.py
 file path=usr/lib/python3.5/lib2to3/__main__.py
 file path=usr/lib/python3.5/lib2to3/btm_matcher.py
@@ -1351,6 +1353,7 @@
 file path=usr/lib/python3.5/test/imghdrdata/python.tiff
 file path=usr/lib/python3.5/test/imghdrdata/python.webp
 file path=usr/lib/python3.5/test/imghdrdata/python.xbm
+file path=usr/lib/python3.5/test/imp_dummy.py
 file path=usr/lib/python3.5/test/inspect_fodder.py
 file path=usr/lib/python3.5/test/inspect_fodder2.py
 file path=usr/lib/python3.5/test/keycert.passwd.pem