Loading ...
Sorry, an error occurred while loading the content.

Re: [Cheetahtemplate-discuss] Re: psyco and 0.9.18

Expand Messages
  • Mike Orr
    ... I d put it in the README in a Compatibility section. People need to know up front whether it s compatible with their other software. ... This SF.Net email
    Message 1 of 12 , Sep 30, 2005
    • 0 Attachment
      Shannon -jj Behrens wrote:

      >Perhaps we should add something to the documentation. For instance,
      >we could add the following to the "Tips, Tricks and Troubleshooting"
      >section:
      >
      >13.10 Using Cheetah with Psyco
      >
      >Psycho cannot effectively be used with Cheetah. Cheetah uses frame
      >hackery to access the caller frame's variables. This is a known
      >limitation of Psyco.
      >
      >


      I'd put it in the README in a Compatibility section. People need to
      know up front whether it's compatible with their other software.




      -------------------------------------------------------
      This SF.Net email is sponsored by:
      Power Architecture Resource Center: Free content, downloads, discussions,
      and more. http://solutions.newsforge.com/ibmarch.tmpl
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • William Dode
      ... Do you think it could be possible to disable psyco only on somes function ? (with psyco.cannotcompile) i couldn t find wich one... Or the opposite, to
      Message 2 of 12 , Sep 30, 2005
      • 0 Attachment
        On 30-09-2005, Shannon -jj Behrens wrote:
        > Perhaps we should add something to the documentation. For instance,
        > we could add the following to the "Tips, Tricks and Troubleshooting"
        > section:
        >
        > 13.10 Using Cheetah with Psyco
        >
        > Psycho cannot effectively be used with Cheetah. Cheetah uses frame
        > hackery to access the caller frame's variables. This is a known
        > limitation of Psyco.

        Do you think it could be possible to disable psyco only on somes
        function ? (with psyco.cannotcompile) i couldn't find wich one...

        Or the opposite, to disable this part of cheetah ? (i remember that
        older versions of cheetah was working with psyco) to see if cheetah
        without this hackery is faster or not than cheetah with psyco.

        --
        William Dodé - http://flibuste.net



        -------------------------------------------------------
        This SF.Net email is sponsored by:
        Power Architecture Resource Center: Free content, downloads, discussions,
        and more. http://solutions.newsforge.com/ibmarch.tmpl
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Mike Orr
        ... Cheetah s lookup code was changed around 0.9.16, so that could explain the difference. Look at the CHANGES file. But given that the change had some
        Message 3 of 12 , Oct 2, 2005
        • 0 Attachment
          William Dode wrote:

          >On 30-09-2005, Shannon -jj Behrens wrote:
          >
          >
          >>Perhaps we should add something to the documentation. For instance,
          >>we could add the following to the "Tips, Tricks and Troubleshooting"
          >>section:
          >>
          >>13.10 Using Cheetah with Psyco
          >>
          >>Psycho cannot effectively be used with Cheetah. Cheetah uses frame
          >>hackery to access the caller frame's variables. This is a known
          >>limitation of Psyco.
          >>
          >>
          >
          >Do you think it could be possible to disable psyco only on somes
          >function ? (with psyco.cannotcompile) i couldn't find wich one...
          >
          >Or the opposite, to disable this part of cheetah ? (i remember that
          >older versions of cheetah was working with psyco) to see if cheetah
          >without this hackery is faster or not than cheetah with psyco.
          >
          >
          >

          Cheetah's lookup code was changed around 0.9.16, so that could explain
          the difference. Look at the CHANGES file. But given that the change
          had some significant benefit (which I forget now), I doubt we'd want to
          roll it back for psyco. "Disabling" it would prob'ly make Cheetah not
          work at all.

          Since the problem is in the namemapper module, you could just exclude
          everything in that module from psyco.


          -------------------------------------------------------
          This SF.Net email is sponsored by:
          Power Architecture Resource Center: Free content, downloads, discussions,
          and more. http://solutions.newsforge.com/ibmarch.tmpl
          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        • Mike Orr
          ... If you re using precompiled templates and want to try different Cheetah versions, be sure to recompile them when changing versions. There s been some
          Message 4 of 12 , Oct 2, 2005
          • 0 Attachment
            Mike Orr wrote:

            > William Dode wrote:
            >
            >> On 30-09-2005, Shannon -jj Behrens wrote:
            >>
            >>
            >>> Perhaps we should add something to the documentation. For instance,
            >>> we could add the following to the "Tips, Tricks and Troubleshooting"
            >>> section:
            >>>
            >>> 13.10 Using Cheetah with Psyco
            >>>
            >>> Psycho cannot effectively be used with Cheetah. Cheetah uses frame
            >>> hackery to access the caller frame's variables. This is a known
            >>> limitation of Psyco.
            >>>
            >>
            >>
            >> Do you think it could be possible to disable psyco only on somes
            >> function ? (with psyco.cannotcompile) i couldn't find wich one...
            >>
            >> Or the opposite, to disable this part of cheetah ? (i remember that
            >> older versions of cheetah was working with psyco) to see if cheetah
            >> without this hackery is faster or not than cheetah with psyco.
            >>
            >>
            >>
            >
            > Cheetah's lookup code was changed around 0.9.16, so that could explain
            > the difference. Look at the CHANGES file. But given that the change
            > had some significant benefit (which I forget now), I doubt we'd want
            > to roll it back for psyco. "Disabling" it would prob'ly make Cheetah
            > not work at all.
            >
            > Since the problem is in the namemapper module, you could just exclude
            > everything in that module from psyco.



            If you're using precompiled templates and want to try different Cheetah
            versions, be sure to recompile them when changing versions. There's
            been some incompatibility in the last version or two, so templates
            compiled by a newer Cheetah aren't compatible with an older version, or
            vice-versa. I've had that problem with templates compiled on Linux,
            after transferring them to a Mac that was set up just after or just
            before a new Cheetah version came out.



            -------------------------------------------------------
            This SF.Net email is sponsored by:
            Power Architecture Resource Center: Free content, downloads, discussions,
            and more. http://solutions.newsforge.com/ibmarch.tmpl
            _______________________________________________
            Cheetahtemplate-discuss mailing list
            Cheetahtemplate-discuss@...
            https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          • Tavis Rudd
            Sorry for the delayed response on this. I ran into this issue earlier this year and have been meaning to add a compiler option to choose between the old
            Message 5 of 12 , Oct 3, 2005
            • 0 Attachment
              Sorry for the delayed response on this. I ran into this issue earlier this
              year and have been meaning to add a compiler option to choose between the old
              psyco-compatible lookup method and the new one. I'll do that later this week
              if I have time.


              On Friday 30 September 2005 14:38, Shannon -jj Behrens wrote:
              > Perhaps we should add something to the documentation. For instance,
              > we could add the following to the "Tips, Tricks and Troubleshooting"
              > section:
              >
              > 13.10 Using Cheetah with Psyco
              >
              > Psycho cannot effectively be used with Cheetah. Cheetah uses frame
              > hackery to access the caller frame's variables. This is a known
              > limitation of Psyco.
              >
              > On 9/30/05, William Dode <wilk-ml@...> wrote:
              > > On 29-09-2005, William Dode wrote:
              > > > On 29-09-2005, Shannon -jj Behrens wrote:
              > > >> If something works in Python, but not in Psyco, it's a bug in Psyco,
              > > >> no?
              > > >
              > > > Yes probably, but i spend a lot of time to find that it was because of
              > > > psyco, i imagine that others cheetah users will fall in the same bug
              > > > :-(
              > > >
              > > > I'm going to show the bug to the psyco devs
              > >
              > > I've the answer :
              > >
              > > ----------------------------------------------------------------------
              > >
              > > >Comment By: Armin Rigo (arigo)
              > >
              > > Date: 2005-09-30 13:01
              > >
              > > Message:
              > > Logged In: YES
              > > user_id=4771
              > >
              > > Cheetah is using frame hackery to access the caller frame's variables.
              > > It is a known limitation of Psyco not to support this. What took me
              > > longer to figure out is why Psyco didn't trigger a warning or an error
              > > that would have made this clear. The answer is that Cheetah has an
              > > optional C extension module for speed to resolve the names; if this C
              > > "_namemapper.so" is removed, then its pure Python equivalent is used,
              > > and we get a (known) crash in inspect.stack().
              > >
              > > There is no workaround for this, you can't use Psyco on the __repr__()
              > > of Templates, sorry. For reference see
              > > http://psyco.sf.net/psycoguide/bugs.html.
              > >
              > > ----------------------------------------------------------------------
              > >
              > > --
              > > William Dodé - http://flibuste.net
              > >
              > >
              > >
              > > -------------------------------------------------------
              > > This SF.Net email is sponsored by:
              > > Power Architecture Resource Center: Free content, downloads, discussions,
              > > and more. http://solutions.newsforge.com/ibmarch.tmpl
              > > _______________________________________________
              > > Cheetahtemplate-discuss mailing list
              > > Cheetahtemplate-discuss@...
              > > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
              >
              > --
              > I have decided to switch to Gmail, but messages to my Yahoo account will
              > still get through.
              >
              >
              > -------------------------------------------------------
              > This SF.Net email is sponsored by:
              > Power Architecture Resource Center: Free content, downloads, discussions,
              > and more. http://solutions.newsforge.com/ibmarch.tmpl
              > _______________________________________________
              > Cheetahtemplate-discuss mailing list
              > Cheetahtemplate-discuss@...
              > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss


              -------------------------------------------------------
              This SF.Net email is sponsored by:
              Power Architecture Resource Center: Free content, downloads, discussions,
              and more. http://solutions.newsforge.com/ibmarch.tmpl
              _______________________________________________
              Cheetahtemplate-discuss mailing list
              Cheetahtemplate-discuss@...
              https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
            • Tavis Rudd
              I ve just checked in a new compiler option useStackFrames . The default is True. If you change it to false your templates should work with psyco. Note that
              Message 6 of 12 , Oct 4, 2005
              • 0 Attachment
                I've just checked in a new compiler option "useStackFrames". The default is
                True. If you change it to false your templates should work with psyco. Note
                that all templates used in a psyco'fied application must be compiled with
                useStackFrames=False.

                On Monday 03 October 2005 22:43, Tavis Rudd wrote:
                > Sorry for the delayed response on this. I ran into this issue earlier this
                > year and have been meaning to add a compiler option to choose between the
                > old psyco-compatible lookup method and the new one. I'll do that later
                > this week if I have time.
                >
                > On Friday 30 September 2005 14:38, Shannon -jj Behrens wrote:
                > > Perhaps we should add something to the documentation. For instance,
                > > we could add the following to the "Tips, Tricks and Troubleshooting"
                > > section:
                > >
                > > 13.10 Using Cheetah with Psyco
                > >
                > > Psycho cannot effectively be used with Cheetah. Cheetah uses frame
                > > hackery to access the caller frame's variables. This is a known
                > > limitation of Psyco.
                > >
                > > On 9/30/05, William Dode <wilk-ml@...> wrote:
                > > > On 29-09-2005, William Dode wrote:
                > > > > On 29-09-2005, Shannon -jj Behrens wrote:
                > > > >> If something works in Python, but not in Psyco, it's a bug in Psyco,
                > > > >> no?
                > > > >
                > > > > Yes probably, but i spend a lot of time to find that it was because
                > > > > of psyco, i imagine that others cheetah users will fall in the same
                > > > > bug
                > > > >
                > > > > :-(
                > > > >
                > > > > I'm going to show the bug to the psyco devs
                > > >
                > > > I've the answer :
                > > >
                > > > ----------------------------------------------------------------------
                > > >
                > > > >Comment By: Armin Rigo (arigo)
                > > >
                > > > Date: 2005-09-30 13:01
                > > >
                > > > Message:
                > > > Logged In: YES
                > > > user_id=4771
                > > >
                > > > Cheetah is using frame hackery to access the caller frame's variables.
                > > > It is a known limitation of Psyco not to support this. What took me
                > > > longer to figure out is why Psyco didn't trigger a warning or an error
                > > > that would have made this clear. The answer is that Cheetah has an
                > > > optional C extension module for speed to resolve the names; if this C
                > > > "_namemapper.so" is removed, then its pure Python equivalent is used,
                > > > and we get a (known) crash in inspect.stack().
                > > >
                > > > There is no workaround for this, you can't use Psyco on the __repr__()
                > > > of Templates, sorry. For reference see
                > > > http://psyco.sf.net/psycoguide/bugs.html.
                > > >
                > > > ----------------------------------------------------------------------
                > > >
                > > > --
                > > > William Dodé - http://flibuste.net
                > > >
                > > >
                > > >
                > > > -------------------------------------------------------
                > > > This SF.Net email is sponsored by:
                > > > Power Architecture Resource Center: Free content, downloads,
                > > > discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
                > > > _______________________________________________
                > > > Cheetahtemplate-discuss mailing list
                > > > Cheetahtemplate-discuss@...
                > > > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
                > >
                > > --
                > > I have decided to switch to Gmail, but messages to my Yahoo account will
                > > still get through.
                > >
                > >
                > > -------------------------------------------------------
                > > This SF.Net email is sponsored by:
                > > Power Architecture Resource Center: Free content, downloads, discussions,
                > > and more. http://solutions.newsforge.com/ibmarch.tmpl
                > > _______________________________________________
                > > Cheetahtemplate-discuss mailing list
                > > Cheetahtemplate-discuss@...
                > > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
                >
                > -------------------------------------------------------
                > This SF.Net email is sponsored by:
                > Power Architecture Resource Center: Free content, downloads, discussions,
                > and more. http://solutions.newsforge.com/ibmarch.tmpl
                > _______________________________________________
                > Cheetahtemplate-discuss mailing list
                > Cheetahtemplate-discuss@...
                > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss


                -------------------------------------------------------
                This SF.Net email is sponsored by:
                Power Architecture Resource Center: Free content, downloads, discussions,
                and more. http://solutions.newsforge.com/ibmarch.tmpl
                _______________________________________________
                Cheetahtemplate-discuss mailing list
                Cheetahtemplate-discuss@...
                https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
              • Tavis Rudd
                ... If you use psyco at all in a process, all cheetah templates in that process must be compiled with the new useStackFrames setting set to False. ... This
                Message 7 of 12 , Oct 5, 2005
                • 0 Attachment
                  On Friday 30 September 2005 23:30, William Dode wrote:
                  > On 30-09-2005, Shannon -jj Behrens wrote:
                  > > Perhaps we should add something to the documentation. For instance,
                  > > we could add the following to the "Tips, Tricks and Troubleshooting"
                  > > section:
                  > >
                  > > 13.10 Using Cheetah with Psyco
                  > >
                  > > Psycho cannot effectively be used with Cheetah. Cheetah uses frame
                  > > hackery to access the caller frame's variables. This is a known
                  > > limitation of Psyco.
                  >
                  > Do you think it could be possible to disable psyco only on somes
                  > function ? (with psyco.cannotcompile) i couldn't find wich one...
                  >
                  > Or the opposite, to disable this part of cheetah ? (i remember that
                  > older versions of cheetah was working with psyco) to see if cheetah
                  > without this hackery is faster or not than cheetah with psyco.

                  If you use psyco at all in a process, all cheetah templates in that process
                  must be compiled with the new useStackFrames setting set to False.


                  -------------------------------------------------------
                  This SF.Net email is sponsored by:
                  Power Architecture Resource Center: Free content, downloads, discussions,
                  and more. http://solutions.newsforge.com/ibmarch.tmpl
                  _______________________________________________
                  Cheetahtemplate-discuss mailing list
                  Cheetahtemplate-discuss@...
                  https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
                Your message has been successfully submitted and would be delivered to recipients shortly.