7 votes
Investigate why types.py doesn't work in partial trust

Description

 
Currently importing types.py in partial trust raises an exception. We should figure out what API we're calling and either avoid it or fallback to a solution which doesn't require trust.

File Attachments


No files are attached


Comments

most recent at top (show oldest at top)
CurtHagenlocher wrote Dec 23 2008 at 7:56 PM
("Partial trust" is used here as a catchall term for restricted-trust environments. The trust profiles of Silverlight and Azure don't match exactly.)

judell wrote Dec 4 2008 at 7:36 PM
Yep, jdhardy's elision seems to get past the types.py roadblock. But then you hit others, like HTTPConnection.getresponse(). Trying to determine what the size and shape of this elephant might be.

jdhardy wrote Nov 30 2008 at 1:26 AM
types.py definitely does not work in medium trust - I did try it :). The offending code is (in Python 2.5, at least):
try:
raise TypeError
except TypeError:
try:
tb = sys.exc_info()[2]
TracebackType = type(tb)
FrameType = type(tb.tb_frame)
except AttributeError:
# In the restricted environment, exc_info returns (None, None,
# None) Then, tb.tb_frame gives an attribute error
pass
tb = None; del tb

Commenting this out will allow types.py to import fine.

Eloff wrote Nov 29 2008 at 5:59 PM
I've used types.py often in Silverlight applications, and I'm pretty sure it worked unmodified.

judell wrote Nov 26 2008 at 9:37 PM
Note: I have not verified Steve' Marx's hunch that types.py is the culprit, I have only verified that something is preventing Azure deployment of IronPython apps that call standard Python libraries.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987