My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 83: dev_appserver.py doesn't work with macports python
7 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  May 2008
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by justin.fagnani, Apr 09, 2008
_hashlib is a C extension under a normal macports python 2.5.2 installation, so it won't import 
in the dev server.

imp.find_module() returns a file_type of C_EXTENSION and HardenedModulesHook.FindModuleRestricted() blocks the import. This can be fixed by modifying 
the python25 portfile or by allowing C extensions inFindModuleRestricted().

Change lines 1140-1141 of dev_appserver.py from:

    if (file_type != self._imp.C_BUILTIN and
        not FakeFile.IsFileAccessible(pathname)):

to:

    if (file_type != self._imp.C_BUILTIN and
        file_type != self._imp.C_EXTENSION and
        not FakeFile.IsFileAccessible(pathname)):

Even though this allows C extensions, all modules not in _WHITE_LIST_C_MODULES will still be 
blocked.
Comment 1 by greg.heidorn, Apr 23, 2008
This workaround for minidom worked for me on Windows XP SP2.  Thanks!
Comment 2 by br...@navelplace.com, May 08, 2008
FYI -- The dev_appserver.py referred to here is:
...\google_appengine\google\appengine\tools\dev_appserver.py
as opposed to
...\google_appengine\dev_appserver.py
(At least these are the windows paths)
Comment 3 by ma...@google.com, May 09, 2008
This issue has been fixed in version 1.0.2 of the SDK, please download it here:
http://code.google.com/p/googleappengine/downloads/list

Status: Fixed
Comment 4 by dimens, Jun 06, 2008
When can I use c extensions defined by myself?
Thank you.
Sign in to add a comment