components/python/python35/patches/25-test_site.patch
changeset 4912 0b79e9575718
child 6447 56a2f066191a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python35/patches/25-test_site.patch	Tue Sep 29 14:11:08 2015 -0700
@@ -0,0 +1,24 @@
+This patch came from in-house.  A patch to make -I imply -S was submitted
+upstream, but rejected, so this is the next simplest way to work around
+issues with when the site module is imported.
+
+--- Python-3.5.0rc2/Lib/test/test_site.py.~1~	2015-08-25 10:19:13.000000000 -0700
++++ Python-3.5.0rc2/Lib/test/test_site.py	2015-09-02 12:38:45.356337855 -0700
+@@ -438,7 +438,7 @@
+     def test_startup_imports(self):
+         # This tests checks which modules are loaded by Python when it
+         # initially starts upon startup.
+-        popen = subprocess.Popen([sys.executable, '-I', '-v', '-c',
++        popen = subprocess.Popen([sys.executable, '-I', '-S', '-v', '-c',
+                                   'import sys; print(set(sys.modules))'],
+                                  stdout=subprocess.PIPE,
+                                  stderr=subprocess.PIPE)
+@@ -447,8 +447,6 @@
+         stderr = stderr.decode('utf-8')
+         modules = eval(stdout)
+ 
+-        self.assertIn('site', modules)
+-
+         # http://bugs.python.org/issue19205
+         re_mods = {'re', '_sre', 'sre_compile', 'sre_constants', 'sre_parse'}
+         # _osx_support uses the re module in many placs