kutsurak / python-bitstring

Automatically exported from code.google.com/p/python-bitstring
0 stars 0 forks source link

mmap not available on Google App Engine #116

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
mmap is not supported on Google App Engine (GAE). I am successfully using 
bitstring on GAE if I get rid of instances of the MmapByteArray class and don't 
use constbitarray or files (which is fine for my needs). I've included a monkey 
patch to do that based on the absence of the mmap module. I'm sure there's a 
better way, but you might consider separating out the feature set so that the 
library may be used on GAE.

Thanks for the great work!

Original issue reported on code.google.com by mbogos...@gmail.com on 6 Aug 2011 at 6:19

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,  thanks for the patch - I'll take a look and see if there's anything 
reasonable I can do. One thing that is confusing me is that as far as I knew 
GAE only supports Python 2.5. I've just checked and all the latest docs suggest 
that 2.6 isn't supported so I don't understand how you are running it at all!

I've not tried GAE myself, but can you point me to something that says 2.6 is 
allowed? I think it could work in the SDK, but perhaps 2.5 will be used in 
production, in which case great chunks of bitstring won't work unless you go 
back to version 1.0.

Original comment by dr.scott...@gmail.com on 6 Aug 2011 at 7:45

GoogleCodeExporter commented 9 years ago
Not much point fixing this until Google App Engine supports a version of Python 
that bitstring does.

Original comment by dr.scott...@gmail.com on 17 Aug 2011 at 6:12

GoogleCodeExporter commented 9 years ago
App Engine now supports python2.7.

When I try to import bitstring in GAE (python27) I get this error,

  ImportError: No module named mmap

Original comment by john.tan...@gmail.com on 15 Dec 2011 at 5:02

GoogleCodeExporter commented 9 years ago
Reopening for investigation. Google's documentation seems to indicate that more 
modules are supported for 2.7 than were for 2.5, but doesn't have a decent list 
that I can find. But if it's only mmap that's the problem then it could be 
worked around...

Original comment by dr.scott...@gmail.com on 15 Dec 2011 at 10:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It's been a while since I reported this, but it looks like GAE supports all 
standard 2.7 modules (https://docs.python.org/2.7/py-modindex.html) with the 
following exceptions:

https://cloud.google.com/appengine/kb/libraries

In addition, GAE provides the following third party libraries:

https://cloud.google.com/appengine/docs/python/tools/libraries27

I hope this helps!

Original comment by mbogos...@gmail.com on 9 Jan 2015 at 5:06

GoogleCodeExporter commented 9 years ago
@mbogosian: So do you know if bitstring now works if imported in GAE? According 
to the GAE documentation it should so I could close this bug, if not then what 
error does it give?

Original comment by dr.scott...@gmail.com on 10 Jan 2015 at 5:25

GoogleCodeExporter commented 9 years ago
Heh, I'm afraid it's a bit of the blind leading the blind here. I have moved on 
from GAE and have no real way to test it currently. I see two other people have 
starred this issue (which I'm guessing includes "john.tan...@gmail.com"; from 
comment https://code.google.com/p/python-bitstring/issues/detail?id=116#c3). 
Hopefully one of those can test? If not, I'm fine with closing it and reopening 
it if it again rears its ugly head....

Original comment by mbogos...@gmail.com on 30 Jan 2015 at 12:24