I have a serious problem in updating GAE from Python 2.5 to Python 2.7 for the application found at glowscript.org. I'm currently testing locally on Windows with GAE Launcher 1.7.6.
Users can create folders with names that contain spaces, and the app converts spaces to '%20' to form a key for the datastore; similarly for file names inside these folders. There exists at glowscript.org a sizable number of users whose data depends on such keys.
In trying to debug locally some odd problems in the Python 2.7 version, it has become clear that there has been a major change in the GAE datastore machinery. Suppose the user creates a folder named 'Test Cases'. Consistent with glowscript.org, this folder name is converted to 'Test%20Cases' and used as the key in a PUT operation:
folder = 'Test%20Cases' f = Folder( parent = username, key_name = folder, public=True ) # Folder inherits from db.Model f.put()
What I see in the log when running with Python 2.7 and launcher 1.7.6 is that the '%20' has been converted back to a space:
"PUT /api/user/test0324k/folder/Test Cases HTTP/1.1" 200 -
When I do the same operations (locally) with Python 2.5 and GAE Launcher 1.7.2, this is what I see in the log:
"PUT /api/user/test0324k/folder/Test%20Cases HTTP/1.1" 200 -
If I deploy to the web, users will get errors because their data has keys that contain '%20', and there now would be no way to reach those keys. I can't stay with the Python 2.5 version, because it is already deprecated and will soon disappear. What can I do to move forward, without destroying many people's work?
put
-ing it. – Ilia Frenkel