[google-appengine] Re: suddenly, a new error in Cheetah in production GAE, doesn't occur in SDK

2008-11-18 Thread James Ashley

Marzia,

I don't want to seem disagreeable, unappreciative, or anything like
that.  But I really have to agree with Ben on this one.

It seems to me that this change introduces a bug.  I've been using
python for 8 years now, and I can't think of any reason for a has_key
method to take only one argument (its parameter list is always (self,
key_name)).  That's a fairly core part of the language.  If you're
going to introduce a new method that does something vaguely similar,
but changes things significantly like this, IMHO, you should really
give it a different name.

Then again, you do have Guido on hand, and his whim certainly trumps
anything anyone else might say.  Maybe he's already vetted this
decision, and I need to just shut up and mind my own business.

Thank you for the help and support you're providing,
James

On Nov 17, 6:10 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi Ben,

 It's certainly not our desire to introduce any changes in the App Engine
 library that would break our users app, but from time to time some parts of
 the apis and libraries will be modified to fix issues/enhance features.

 When these fixes happen, it's always possible that this will break a certain
 subset of applications who are implicitly or incorrectly assuming certain
 features of the API.  Of course, we'd like to avoid this when possible, but
 sometimes it's difficult to anticipate how some of these changes can affect
 certain applications.

 We are certainly working on finding the right balance, and hope that as we
 continue development with App Engine these kind of things will happen less
 often.

 -Marzia

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: suddenly, a new error in Cheetah in production GAE, doesn't occur in SDK

2008-11-17 Thread Marzia Niccolai
Hi Ben,

It's certainly not our desire to introduce any changes in the App Engine
library that would break our users app, but from time to time some parts of
the apis and libraries will be modified to fix issues/enhance features.

When these fixes happen, it's always possible that this will break a certain
subset of applications who are implicitly or incorrectly assuming certain
features of the API.  Of course, we'd like to avoid this when possible, but
sometimes it's difficult to anticipate how some of these changes can affect
certain applications.

We are certainly working on finding the right balance, and hope that as we
continue development with App Engine these kind of things will happen less
often.

-Marzia

On Sun, Nov 16, 2008 at 10:20 AM, Ben Adida [EMAIL PROTECTED] wrote:


 Hi Marzia,

 Thanks for the explanation!

 I'm a little bit surprised that the production API would change on its
 own like this. This makes a production application incredibly unstable
 if the underlying GAE API can change without warning. Is there any
 plan to allow an application to freeze the API on which it relies so
 that this kind of instability doesn't occur? Or is this simply because
 GAE is in beta and when (hopefully soon) it goes production then
 this won't happen?

 -Ben

 On Nov 15, 1:07 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  The recent maintenance included some changes to db.py, including adding a
  has_key function, which seems to be causing the error with template
  rendering.
 
  The new SDK has not yet been released, but the easiest/quickest fix would
 be
  to take the google.appengine.ext.db __init__.py file from 1.1.5, rename
 it,
  and included it with your application.
 
  Just change the imports, replacing from google.appengine.ext import db
 with
  from Db import db (assuming you changed the name of __init__.py to Db.py,
  for instance).
 
  Hope this helps, sorry for the confusion!
 
  -Marzia
 
  On Fri, Nov 14, 2008 at 3:19 PM, Ben Adida [EMAIL PROTECTED] wrote:
 
   Hi Marzia,
 
   Thanks again for your help.
 
   I want to stress that this started happening with no change in code on
   my end. And it works just fine in the SDK. Was there a library change
   of any kind in GAE over the last few days?
 
   The source code for my app is entirely public. Here's the template in
   particular:
 
  http://github.com/benadida/helios/tree/master/templates/election/one..
 ..
 
   and the controller
 
  http://github.com/benadida/helios/tree/master/controllers/election.py
 
   line 395.
 
   Thanks again,
 
   -Ben
 
   On Nov 14, 3:01 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
Hi Ben,
 
It's difficult to know what this stack trace means with out an idea
 of
   what
kind of obj the has_key method belongs to.  Would it be possible to
 at
   least
provide the template that is being rendered? And a description of
 what
   one
expects to be rendered?
 
-Marzia
 
On Fri, Nov 14, 2008 at 11:51 AM, Ben Adida [EMAIL PROTECTED] wrote:
 
 Marzia,
 
 It's a little difficult to cut down the example to size, because
 *all*
 of my pages that render content from the store are giving errors.
 Here's one URL where the issue comes up:
 

 http://dev.heliosvoting.org/elections/ahBkZXYtaGVsaW9zdm90aW5ncg8LEgh.
   ..
 
 and that will give you the complete stack trace.
 
 Let me know if that helps, and thanks.
 
 -Ben
 
 On Nov 14, 9:49 am, Marzia Niccolai [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  Can you provide a more complete example of the code that causes
 this
 issue?
  As well as the complete stack trace.
 
  Thanks,
  Marzia
 
  On Fri, Nov 14, 2008 at 9:40 AM, Ben Adida [EMAIL PROTECTED]
 wrote:
 
   Suddenly, I'm getting the following errors on just about every
   page:
 
   if hasattr(obj, 'has_key') and obj.has_key(key):
   TypeError: has_key() takes exactly 1 argument (2 given)
 
   This is within the Cheetah templating library, _valueForName
   function.
   I haven't modified the Cheetah code, nor have I modified my
   application at GAE in the last few days.
 
   And I can't reproduce this error in my local SDK installation.
 
   Did GAE just change some internal libraries? I don't even
   understand
   why has_key() would ever take only one argument...
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: suddenly, a new error in Cheetah in production GAE, doesn't occur in SDK

2008-11-16 Thread Ben Adida

Hi Marzia,

Thanks for the explanation!

I'm a little bit surprised that the production API would change on its
own like this. This makes a production application incredibly unstable
if the underlying GAE API can change without warning. Is there any
plan to allow an application to freeze the API on which it relies so
that this kind of instability doesn't occur? Or is this simply because
GAE is in beta and when (hopefully soon) it goes production then
this won't happen?

-Ben

On Nov 15, 1:07 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi Ben,

 The recent maintenance included some changes to db.py, including adding a
 has_key function, which seems to be causing the error with template
 rendering.

 The new SDK has not yet been released, but the easiest/quickest fix would be
 to take the google.appengine.ext.db __init__.py file from 1.1.5, rename it,
 and included it with your application.

 Just change the imports, replacing from google.appengine.ext import db with
 from Db import db (assuming you changed the name of __init__.py to Db.py,
 for instance).

 Hope this helps, sorry for the confusion!

 -Marzia

 On Fri, Nov 14, 2008 at 3:19 PM, Ben Adida [EMAIL PROTECTED] wrote:

  Hi Marzia,

  Thanks again for your help.

  I want to stress that this started happening with no change in code on
  my end. And it works just fine in the SDK. Was there a library change
  of any kind in GAE over the last few days?

  The source code for my app is entirely public. Here's the template in
  particular:

 http://github.com/benadida/helios/tree/master/templates/election/one

  and the controller

 http://github.com/benadida/helios/tree/master/controllers/election.py

  line 395.

  Thanks again,

  -Ben

  On Nov 14, 3:01 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
   Hi Ben,

   It's difficult to know what this stack trace means with out an idea of
  what
   kind of obj the has_key method belongs to.  Would it be possible to at
  least
   provide the template that is being rendered? And a description of what
  one
   expects to be rendered?

   -Marzia

   On Fri, Nov 14, 2008 at 11:51 AM, Ben Adida [EMAIL PROTECTED] wrote:

Marzia,

It's a little difficult to cut down the example to size, because *all*
of my pages that render content from the store are giving errors.
Here's one URL where the issue comes up:

   http://dev.heliosvoting.org/elections/ahBkZXYtaGVsaW9zdm90aW5ncg8LEgh.
  ..

and that will give you the complete stack trace.

Let me know if that helps, and thanks.

-Ben

On Nov 14, 9:49 am, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi Ben,

 Can you provide a more complete example of the code that causes this
issue?
 As well as the complete stack trace.

 Thanks,
 Marzia

 On Fri, Nov 14, 2008 at 9:40 AM, Ben Adida [EMAIL PROTECTED] wrote:

  Suddenly, I'm getting the following errors on just about every
  page:

  if hasattr(obj, 'has_key') and obj.has_key(key):
  TypeError: has_key() takes exactly 1 argument (2 given)

  This is within the Cheetah templating library, _valueForName
  function.
  I haven't modified the Cheetah code, nor have I modified my
  application at GAE in the last few days.

  And I can't reproduce this error in my local SDK installation.

  Did GAE just change some internal libraries? I don't even
  understand
  why has_key() would ever take only one argument...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: suddenly, a new error in Cheetah in production GAE, doesn't occur in SDK

2008-11-15 Thread Marzia Niccolai
Hi Ben,

The recent maintenance included some changes to db.py, including adding a
has_key function, which seems to be causing the error with template
rendering.

The new SDK has not yet been released, but the easiest/quickest fix would be
to take the google.appengine.ext.db __init__.py file from 1.1.5, rename it,
and included it with your application.

Just change the imports, replacing from google.appengine.ext import db with
from Db import db (assuming you changed the name of __init__.py to Db.py,
for instance).

Hope this helps, sorry for the confusion!

-Marzia

On Fri, Nov 14, 2008 at 3:19 PM, Ben Adida [EMAIL PROTECTED] wrote:


 Hi Marzia,

 Thanks again for your help.

 I want to stress that this started happening with no change in code on
 my end. And it works just fine in the SDK. Was there a library change
 of any kind in GAE over the last few days?

 The source code for my app is entirely public. Here's the template in
 particular:

 http://github.com/benadida/helios/tree/master/templates/election/one.tmpl

 and the controller

 http://github.com/benadida/helios/tree/master/controllers/election.py

 line 395.

 Thanks again,

 -Ben

 On Nov 14, 3:01 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  It's difficult to know what this stack trace means with out an idea of
 what
  kind of obj the has_key method belongs to.  Would it be possible to at
 least
  provide the template that is being rendered? And a description of what
 one
  expects to be rendered?
 
  -Marzia
 
  On Fri, Nov 14, 2008 at 11:51 AM, Ben Adida [EMAIL PROTECTED] wrote:
 
   Marzia,
 
   It's a little difficult to cut down the example to size, because *all*
   of my pages that render content from the store are giving errors.
   Here's one URL where the issue comes up:
 
  http://dev.heliosvoting.org/elections/ahBkZXYtaGVsaW9zdm90aW5ncg8LEgh.
 ..
 
   and that will give you the complete stack trace.
 
   Let me know if that helps, and thanks.
 
   -Ben
 
   On Nov 14, 9:49 am, Marzia Niccolai [EMAIL PROTECTED] wrote:
Hi Ben,
 
Can you provide a more complete example of the code that causes this
   issue?
As well as the complete stack trace.
 
Thanks,
Marzia
 
On Fri, Nov 14, 2008 at 9:40 AM, Ben Adida [EMAIL PROTECTED] wrote:
 
 Suddenly, I'm getting the following errors on just about every
 page:
 
 if hasattr(obj, 'has_key') and obj.has_key(key):
 TypeError: has_key() takes exactly 1 argument (2 given)
 
 This is within the Cheetah templating library, _valueForName
 function.
 I haven't modified the Cheetah code, nor have I modified my
 application at GAE in the last few days.
 
 And I can't reproduce this error in my local SDK installation.
 
 Did GAE just change some internal libraries? I don't even
 understand
 why has_key() would ever take only one argument...
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: suddenly, a new error in Cheetah in production GAE, doesn't occur in SDK

2008-11-14 Thread Marzia Niccolai
Hi Ben,

Can you provide a more complete example of the code that causes this issue?
As well as the complete stack trace.

Thanks,
Marzia

On Fri, Nov 14, 2008 at 9:40 AM, Ben Adida [EMAIL PROTECTED] wrote:



 Suddenly, I'm getting the following errors on just about every page:

 if hasattr(obj, 'has_key') and obj.has_key(key):
 TypeError: has_key() takes exactly 1 argument (2 given)

 This is within the Cheetah templating library, _valueForName function.
 I haven't modified the Cheetah code, nor have I modified my
 application at GAE in the last few days.

 And I can't reproduce this error in my local SDK installation.

 Did GAE just change some internal libraries? I don't even understand
 why has_key() would ever take only one argument...

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---