This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ned.deily, orsenthil, ronaldoussoren
Date 2010-03-09.10:09:02
SpamBayes Score 5.4278804e-13
Marked as misclassified No
Message-id <1268129346.82.0.105764166971.issue8095@psf.upfronthosting.co.za>
In-reply-to
Content
I don't have a 10.3 system to test on, and definitely don't want to spent effort on enabling compiles on 10.3

The patch below would probably fix the crash when running a binary created on 10.4 or later on osx 10.3:

Index: ../Mac/Modules/_scproxy.c
===================================================================
--- ../Mac/Modules/_scproxy.c	(revision 78807)
+++ ../Mac/Modules/_scproxy.c	(working copy)
@@ -64,13 +64,18 @@
 	result = PyDict_New();
 	if (result == NULL) goto error;
 
-	aNum = CFDictionaryGetValue(proxyDict, 
+	if (kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
+		aNum = CFDictionaryGetValue(proxyDict, 
 			kSCPropNetProxiesExcludeSimpleHostnames);
-	if (aNum == NULL) {
-		v = PyBool_FromLong(0);
-	} else {
-		v = PyBool_FromLong(cfnum_to_int32(aNum));
+		if (aNum == NULL) {
+			v = PyBool_FromLong(1);
+		} else {
+			v = PyBool_FromLong(cfnum_to_int32(aNum));
+		}
+	}  else {
+		v = PyBool_FromLong(1);
 	}
+
 	if (v == NULL) goto error;
 
 	r = PyDict_SetItemString(result, "exclude_simple", v);


The patch hasn't been compiled yet, but the idea should be clear: test if kSCPropNetProxiesExcludeSimpleHostnames has a valid value before using it, default to 'True'.

(This also changes the default on 10.4/10.5, IMHO defaulting to true would be better: I haven't seen an enviroment yet where local systems should be accessed through a proxy).

BTW. Removing 3.1 and 3.2 because _scproxy isn't in those releases yet (mostly because porting requires signifant changes to the C code and I haven't had time to do that yet)
History
Date User Action Args
2010-03-09 10:09:06ronaldoussorensetrecipients: + ronaldoussoren, orsenthil, ned.deily
2010-03-09 10:09:06ronaldoussorensetmessageid: <1268129346.82.0.105764166971.issue8095@psf.upfronthosting.co.za>
2010-03-09 10:09:03ronaldoussorenlinkissue8095 messages
2010-03-09 10:09:03ronaldoussorencreate