Aaron Maxwell - SnapLogic | 1 Jun 2007 03:14

[Trac-dev] Login bug w/ .10.4 + AccountManagerPlugin - ticket #1493


Hi,

There is a highest/blocker bug about sessions expiring in .10.4, which
we are attempting to fix.  Having dug pretty deep into the internals,
it appears that a specific sql query is misbehaving.  I've posted a
writeup here:

http://trac-hacks.org/ticket/1493#comment:7

Please look at it and let me know if you have a suggestion.  It seems
like we're pretty close to the solution for this issue; hopefully we
can come up with a patch that fixes it.

Thanks much,
Aaron Maxwell
SnapLogic - Open Source Internet Data Services
http://snaplogic.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Christian Boos | 1 Jun 2007 10:04
Picon

[Trac-dev] Re: Login bug w/ .10.4 + AccountManagerPlugin - ticket #1493


Aaron Maxwell - SnapLogic wrote:
> Hi,
>
> There is a highest/blocker bug about sessions expiring in .10.4, which
> we are attempting to fix.  Having dug pretty deep into the internals,
> it appears that a specific sql query is misbehaving.  I've posted a
> writeup here:
>
> http://trac-hacks.org/ticket/1493#comment:7
>
> Please look at it and let me know if you have a suggestion.  It seems
> like we're pretty close to the solution for this issue; hopefully we
> can come up with a patch that fixes it.
>   

Here are some ideas to try out...

Looking at the changes from 0.10.3.1 to 0.10.4, I don't see anything 
that could have introduced this "interesting" new behavior, except 
perhaps at the level of the mysql_backend support itself:

http://trac.edgewall.org/changeset?new=branches%2F0.10-stable%2Ftrac%2Fdb%2Fmysql_backend.py%405024&old=branches%2F0.10-stable%2Ftrac%2Fdb%2Fmysql_backend.py%404342

Try to undo those changes (which, OTOH, were done for a reason, so you 
might have other issues), to check if this solves the "auto-logout" issue.

If this is not the case, then please setup a test env using something 
else than MySQL (e.g. sqlite), and see if you experience the issue as well.

(Continue reading)

kaplan.yosef@gmail.com | 1 Jun 2007 12:19
Picon

[Trac-dev] Ergonomic Mobile Computing


I'm sharing with you my secret of the ultimate comfort using a laptop.
Working with a laptop desk helps cool my laptop and it's a lot more
easier to handle. The painful experience of aching wrists, strained
neck and back is a story of the past with ergonomic typing and viewing
angles. I feel more at ease with the wide mousing area and raised
screen. It only pops-up one question in my mind "Why didn't I buy it
earlier?".

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Aaron Maxwell - SnapLogic | 1 Jun 2007 22:31

[Trac-dev] Re: Login bug w/ .10.4 + AccountManagerPlugin - ticket #1493


As a quick trial, I just replaced the mysql_backend.py in .10.4 with
the one from r4342, and the issue went away.  So it looks like the
issue is in mysql_backend.py rather than MySQLdb or mysql.  That's
good news.

Like you said, all the changes are there for a reason, so the next
step is for me to determine exactly what difference in
mysql_backend.py is connected with the issue.  I'll work on that today
and post here when we have a candidate patch.

Christian, thank you.

-Aaron

On Jun 1, 1:04 am, Christian Boos <c... <at> neuf.fr> wrote:
> Aaron Maxwell - SnapLogic wrote:
>
> > Hi,
>
> > There is a highest/blocker bug about sessions expiring in .10.4, which
> > we are attempting to fix.  Having dug pretty deep into the internals,
> > it appears that a specific sql query is misbehaving.  I've posted a
> > writeup here:
>
> >http://trac-hacks.org/ticket/1493#comment:7
>
> > Please look at it and let me know if you have a suggestion.  It seems
> > like we're pretty close to the solution for this issue; hopefully we
> > can come up with a patch that fixes it.
(Continue reading)

Aaron Maxwell - SnapLogic | 1 Jun 2007 23:08

[Trac-dev] Re: Login bug w/ .10.4 + AccountManagerPlugin - ticket #1493


Update: it looks like this is the relevant diff:

http://trac.edgewall.org/changeset/4962

Still investigating...
-A

On Jun 1, 1:31 pm, Aaron Maxwell - SnapLogic <a... <at> snaplogic.org>
wrote:
> As a quick trial, I just replaced the mysql_backend.py in .10.4 with
> the one from r4342, and the issue went away.  So it looks like the
> issue is in mysql_backend.py rather than MySQLdb or mysql.  That's
> good news.
>
> Like you said, all the changes are there for a reason, so the next
> step is for me to determine exactly what difference in
> mysql_backend.py is connected with the issue.  I'll work on that today
> and post here when we have a candidate patch.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Aaron Maxwell - SnapLogic | 2 Jun 2007 02:33

[Trac-dev] Re: Login bug w/ .10.4 + AccountManagerPlugin - ticket #1493


OK, here is a patch that seems to correct the issue:
http://trac-hacks.org/attachment/ticket/1493/mysql-autologoutbug.patch

This seems related to the previously closed ticket 4802:
http://trac.edgewall.org/ticket/4802

I believe the reason it does not work on our setup has to do with the
return value of _mysql.ping().  In r5565 (i.e. 0.10.4), in db/
mysql_backend.py we had:

<pre>
    def rollback(self):
        if self.cnx.ping():
            self._set_character_set(self.cnx, 'utf8')
            self.cnx.rollback()
        else:
            self._is_closed = True
</pre>

In our setup, self.cnx.ping() always returns None (as determined
through inserted logging statements).  I suppose it returns a
meaningful value in some other setups.  However, from the
documentation I found on the net, the return value python's
_mysql.ping() [1] is not explicitly defined, even though the
underlying C api [2] does have a return value. In any case, checking
ping's return value does not seem to work properly in our case, so I
put in a try-except.

Christian, I see you handled the original ticket above.  Do you forsee
(Continue reading)

Roo | 2 Jun 2007 13:34
Picon

[Trac-dev] 0.11dev New Ticket Error


Hi,

When testing Trac as a standalone install (after a python setup.py
install) I am experiencing the following error. I hope it is just a
transient error on trunk but htought I should drop a line.

Cheers.

-----------------------------------------------------------------------

UndefinedError: "attachments" not defined

Traceback:
 File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r5570-py2.5.egg/trac/ticket/templates/ticket.html",
line 372, in  <Expression u"not ticket.exists and
attachments.has_perm('CREATE')">

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4)
Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)
Trac: 	0.11dev-r5570
Python: 	2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu
4.1.2-0ubuntu4)]
setuptools: 	0.6c5
SQLite: 	3.3.13
pysqlite: 	2.3.2
Genshi: 	0.4.1
Subversion: 	1.4.3 (r23084)
(Continue reading)

Roo | 2 Jun 2007 13:46
Picon

[Trac-dev] Re: 0.11dev New Ticket Error


Looked a little further into it, it seems cboos made changes that
updated the line reporting the error in recent commits, see
http://trac.edgewall.org/changeset/5568.

Guess it is a risk of using trunk... :) By the way thanks to all devs
for the good work.

Cheers,

Roo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Deen Sethanandha | 2 Jun 2007 18:47
Picon

[Trac-dev] Some question about setup.py for plugin dev.

Hi All,
 
   I finally get to work on this.  I spent a few hour trying to get the Helloworld plugin to work.  I know I am a newbie (both Python and Trac) but I think it is very important to have good document for newbie to be able to create a helloworld plugin in short time.  I have a few questions regarding this. 
 
  1) Naming in setup.py.  I am trying to understand how the name works.  Let's use example from the link.
from setuptools import find_packages, setup setup( name='TracHelloWorld', version ='1.0', packages=find_packages(exclude =['*.tests*']), entry_points = """ [trac.plugins] helloworld = myplugs.helloworld """, )
         I notice that the name TracHelloworld will be the name of the egg.  I don't understand how the naming for [trac.plugins] works.  The problem is, I can't get the helloworld plugin to work using this setup.py.  I have to use this one.  I change the name of the folder to helloworld and have helloword.py in it. 
 
    from setuptools import find_packages , setup

    setup(
    name= 'helloworld', version='1.0',
    packages=find_packages(exclude =['*.tests*']),
    entry_points = """
        [trac.plugins]
        helloworld = helloworld.helloworld
    """
,
)
 
  My question would be, why the first setup.py doesn't work? 
 
 2) Do I need to add the plugin into the trac.ini to work?  If so what name should I use?
 
      Do I use the name of package or the name of the egg?  I tried using TracHelloWorld.* = enabeled but that didn't work.  After I changed the setup.py to the second one, and use helloworld.*  = enabled, it worked.
 
 3) What are considered packages when using find_packages?  Are they the folders that is in the same level as the setup.py? 
 
 4) How plugins are structured?  I start to get confused when I tried to create plugin.  Does each module considered a plugin or the package is considered a  plugin?  When I look at the trac code, I see that many .py files under the same folder (package) such as ticket are included under [ trac.plugins]
 
 5) If there are many plugin under same package, how can I distinguish between a plugin and normal .py file.  I think anything that is considered a plugin should be in the setup file.  What about the api.py , model.py, and notification? 
 
 6) What would be your advice on how to design plugin?  There are many feature that I would like to create as plugin.  I am not sure if I should do it as one plugin or more.  Currently, my rule of thumb is to let a plugin have only one new menu.
 
 5) Is it possible to modify the content of Trac's core using plugin?  I would like to enhance the results in milestone page for example.  I would like to add the capability to view progress by action.  I think it is useful to know how many ticket are new, assigned, fixed.
 
 
  Thanks a lot in advance.  I will try to incoperate my new knowlege into the wiki so that it is easier to follow.
 
 
 
 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Christian Boos | 2 Jun 2007 20:54
Picon

[Trac-dev] Re: 0.11dev New Ticket Error


Roo wrote:
> Hi,
>
> When testing Trac as a standalone install (after a python setup.py
> install) I am experiencing the following error. I hope it is just a
> transient error on trunk but htought I should drop a line.
>
> Cheers.
>
> -----------------------------------------------------------------------
>
> UndefinedError: "attachments" not defined
>   

My mistake. Fixed in r5572. Thanks for the report!

-- Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com
To unsubscribe from this group, send email to trac-dev-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane