Mailing List Archive

TestManagerForTracPlugin not working
Hello,

Trying to install the Test Manager plugin
(https://trac-hacks.org/wiki/TestManagerForTracPlugin) and can't seem to
get it to work. Searching implies it should be working, so I must have
missed something obvious somewhere.

Trac: v1.4.3
TestManager: 1.9.1-py2.7
TracGenericClass: 1.1.7-py2.7
TracGenericWorkflow: 1.0.5.py2.7
Genshi: 0.7.5

CentOS: 8.4.2105
Python: 2.7.18

From trac.ini

[components]
tracgenericclass.* = enabled
tracgenericworkflow.* = enabled
testmanager.* = enabled

Permissions on egg files: 644

Apache restarted (multiple times)

Error in trac.log

Trac[loader] ERROR: Skipping "testmanager = testmanager": ImportError:
cannot import name with_transaction

Any help appreciated.
Robert Kuropkat

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/befd3af6-f056-4b1a-b489-01884d0b649fn%40googlegroups.com.
Re: TestManagerForTracPlugin not working [ In reply to ]
On Monday, January 10, 2022 at 11:09:45 AM UTC-8 robert....@gmail.com wrote:

> Hello,
>
> Trying to install the Test Manager plugin (
> https://trac-hacks.org/wiki/TestManagerForTracPlugin) and can't seem to
> get it to work. Searching implies it should be working, so I must have
> missed something obvious somewhere.
>
> Trac: v1.4.3
> TestManager: 1.9.1-py2.7
> TracGenericClass: 1.1.7-py2.7
> TracGenericWorkflow: 1.0.5.py2.7
> Genshi: 0.7.5
>
> CentOS: 8.4.2105
> Python: 2.7.18
>
> From trac.ini
>
> [components]
> tracgenericclass.* = enabled
> tracgenericworkflow.* = enabled
> testmanager.* = enabled
>
> Permissions on egg files: 644
>
> Apache restarted (multiple times)
>
> Error in trac.log
>
> Trac[loader] ERROR: Skipping "testmanager = testmanager": ImportError:
> cannot import name with_transaction
>
> Any help appreciated.
> Robert Kuropkat
>

The plugin isn't compatible with Trac 1.4 because it uses deprecated
database access methods that have been removed:
https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/8eaccba9-56c3-4db5-8dce-f071d5ab2a0fn%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
On 1/11/22 1:07 PM, RjOllos wrote:
>
>
> On Monday, January 10, 2022 at 11:09:45 AM UTC-8 robert....@gmail.com
> wrote:
>
> Hello,
>
> Trying to install the Test Manager plugin
> (https://trac-hacks.org/wiki/TestManagerForTracPlugin
> <https://trac-hacks.org/wiki/TestManagerForTracPlugin>) and can't
> seem to get it to work.  Searching implies it should be working,
> so I must have missed something obvious somewhere.
>
> Trac: v1.4.3
> TestManager: 1.9.1-py2.7
> TracGenericClass: 1.1.7-py2.7
> TracGenericWorkflow: 1.0.5.py2.7
> Genshi: 0.7.5
>
> CentOS: 8.4.2105
> Python: 2.7.18
>
> From trac.ini
>
> [components]
> tracgenericclass.* = enabled
> tracgenericworkflow.* = enabled
> testmanager.* = enabled
>
> Permissions on egg files: 644
>
> Apache restarted (multiple times)
>
> Error in trac.log
>
> Trac[loader] ERROR: Skipping "testmanager = testmanager":
> ImportError: cannot import name with_transaction
>
> Any help appreciated.
> Robert Kuropkat
>
>
> The plugin isn't compatible with Trac 1.4 because it uses deprecated
> database access methods that have been removed:
> https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges
>
> Ryan
> --


Dude.... I was afraid that would be the answer.  Is there a solid
alternative?  I can use a separate product, but I was pretty excited
about a built-in Trac option.  How difficult an upgrade would it be? 
There was enough positive commentary on this plugin I might be willing
to give it a go...

Robert Kuropkat


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/fce77c3f-47ea-f303-23da-3bf3bd7b4cf4%40gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
TestManagerForTracPlugin
<https://trac-hacks.org/wiki/TestManagerForTracPlugin> is one of the
largest plugins that is publicly available and likely to be a large piece
of work to migrate.
Depending on your use case, the only other option is
https://trac-hacks.org/wiki/QaTrackerPlugin

-- figaro

On Tuesday, 11 January 2022 at 19:10:18 UTC+1 robert....@gmail.com wrote:

>
> On 1/11/22 1:07 PM, RjOllos wrote:
>
>
>
> On Monday, January 10, 2022 at 11:09:45 AM UTC-8 robert....@gmail.com
> wrote:
>
>> Hello,
>>
>> Trying to install the Test Manager plugin (
>> https://trac-hacks.org/wiki/TestManagerForTracPlugin) and can't seem to
>> get it to work. Searching implies it should be working, so I must have
>> missed something obvious somewhere.
>>
>> Trac: v1.4.3
>> TestManager: 1.9.1-py2.7
>> TracGenericClass: 1.1.7-py2.7
>> TracGenericWorkflow: 1.0.5.py2.7
>> Genshi: 0.7.5
>>
>> CentOS: 8.4.2105
>> Python: 2.7.18
>>
>> From trac.ini
>>
>> [components]
>> tracgenericclass.* = enabled
>> tracgenericworkflow.* = enabled
>> testmanager.* = enabled
>>
>> Permissions on egg files: 644
>>
>> Apache restarted (multiple times)
>>
>> Error in trac.log
>>
>> Trac[loader] ERROR: Skipping "testmanager = testmanager": ImportError:
>> cannot import name with_transaction
>>
>> Any help appreciated.
>> Robert Kuropkat
>>
>
> The plugin isn't compatible with Trac 1.4 because it uses deprecated
> database access methods that have been removed:
> https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges
>
> Ryan
>
> --
>
>
> Dude.... I was afraid that would be the answer. Is there a solid
> alternative? I can use a separate product, but I was pretty excited about
> a built-in Trac option. How difficult an upgrade would it be? There was
> enough positive commentary on this plugin I might be willing to give it a
> go...
>
> Robert Kuropkat
>
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Installed QaTrackerPlugin to give it a try.  Created a Test Plan
(Milestone) and a Test Case (Ticket) and assigned the Test Case to the
Test Plan.  Tried to create a Test Run in the QA Tracker tab and got an
error:

            AttributeError: 'Environment' object has no attribute
'get_db_cnx'

Robert Kuropkat


On 1/11/22 4:27 PM, figaro wrote:
> TestManagerForTracPlugin
> <https://trac-hacks.org/wiki/TestManagerForTracPlugin> is one of the
> largest plugins that is publicly available and likely to be a large
> piece of work to migrate.
> Depending on your use case, the only other option is
> https://trac-hacks.org/wiki/QaTrackerPlugin
>
> -- figaro
>
> On Tuesday, 11 January 2022 at 19:10:18 UTC+1 robert....@gmail.com wrote:
>
>
> On 1/11/22 1:07 PM, RjOllos wrote:
>>
>>
>> On Monday, January 10, 2022 at 11:09:45 AM UTC-8
>> robert....@gmail.com wrote:
>>
>> Hello,
>>
>> Trying to install the Test Manager plugin
>> (https://trac-hacks.org/wiki/TestManagerForTracPlugin
>> <https://trac-hacks.org/wiki/TestManagerForTracPlugin>) and
>> can't seem to get it to work.  Searching implies it should be
>> working, so I must have missed something obvious somewhere.
>>
>> Trac: v1.4.3
>> TestManager: 1.9.1-py2.7
>> TracGenericClass: 1.1.7-py2.7
>> TracGenericWorkflow: 1.0.5.py2.7
>> Genshi: 0.7.5
>>
>> CentOS: 8.4.2105
>> Python: 2.7.18
>>
>> From trac.ini
>>
>> [components]
>> tracgenericclass.* = enabled
>> tracgenericworkflow.* = enabled
>> testmanager.* = enabled
>>
>> Permissions on egg files: 644
>>
>> Apache restarted (multiple times)
>>
>> Error in trac.log
>>
>> Trac[loader] ERROR: Skipping "testmanager = testmanager":
>> ImportError: cannot import name with_transaction
>>
>> Any help appreciated.
>> Robert Kuropkat
>>
>>
>> The plugin isn't compatible with Trac 1.4 because it uses
>> deprecated database access methods that have been removed:
>> https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges
>> <https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges>
>>
>> Ryan
>> --
>
>
> Dude.... I was afraid that would be the answer.  Is there a solid
> alternative?  I can use a separate product, but I was pretty
> excited about a built-in Trac option.  How difficult an upgrade
> would it be?  There was enough positive commentary on this plugin
> I might be willing to give it a go...
>
> Robert Kuropkat
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Trac Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe
> <https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> trac-users+unsubscribe@googlegroups.com
> <mailto:trac-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a9c4b4c2-f5d6-4496-2b3c-6cfdef3ca58d%40gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Thank you for your efforts nonetheless.
'get_db_cnx' happens to be deprecated, and that means that plugin will have
to be upgraded too.
As far as I know, no other plugin has been developed and is available on
trac-hacks that supports testing software.

-- figaro

On Wednesday, 12 January 2022 at 20:02:50 UTC+1 robert....@gmail.com wrote:

>
> Installed QaTrackerPlugin to give it a try. Created a Test Plan
> (Milestone) and a Test Case (Ticket) and assigned the Test Case to the Test
> Plan. Tried to create a Test Run in the QA Tracker tab and got an error:
>
> AttributeError: 'Environment' object has no attribute
> 'get_db_cnx'
>
> Robert Kuropkat
>
>
> On 1/11/22 4:27 PM, figaro wrote:
>
> TestManagerForTracPlugin
> <https://trac-hacks.org/wiki/TestManagerForTracPlugin> is one of the
> largest plugins that is publicly available and likely to be a large piece
> of work to migrate.
> Depending on your use case, the only other option is
> https://trac-hacks.org/wiki/QaTrackerPlugin
>
> -- figaro
>
> On Tuesday, 11 January 2022 at 19:10:18 UTC+1 robert....@gmail.com wrote:
>
>>
>> On 1/11/22 1:07 PM, RjOllos wrote:
>>
>>
>>
>> On Monday, January 10, 2022 at 11:09:45 AM UTC-8 robert....@gmail.com
>> wrote:
>>
>>> Hello,
>>>
>>> Trying to install the Test Manager plugin (
>>> https://trac-hacks.org/wiki/TestManagerForTracPlugin) and can't seem to
>>> get it to work. Searching implies it should be working, so I must have
>>> missed something obvious somewhere.
>>>
>>> Trac: v1.4.3
>>> TestManager: 1.9.1-py2.7
>>> TracGenericClass: 1.1.7-py2.7
>>> TracGenericWorkflow: 1.0.5.py2.7
>>> Genshi: 0.7.5
>>>
>>> CentOS: 8.4.2105
>>> Python: 2.7.18
>>>
>>> From trac.ini
>>>
>>> [components]
>>> tracgenericclass.* = enabled
>>> tracgenericworkflow.* = enabled
>>> testmanager.* = enabled
>>>
>>> Permissions on egg files: 644
>>>
>>> Apache restarted (multiple times)
>>>
>>> Error in trac.log
>>>
>>> Trac[loader] ERROR: Skipping "testmanager = testmanager": ImportError:
>>> cannot import name with_transaction
>>>
>>> Any help appreciated.
>>> Robert Kuropkat
>>>
>>
>> The plugin isn't compatible with Trac 1.4 because it uses deprecated
>> database access methods that have been removed:
>> https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges
>>
>> Ryan
>>
>> --
>>
>>
>> Dude.... I was afraid that would be the answer. Is there a solid
>> alternative? I can use a separate product, but I was pretty excited about
>> a built-in Trac option. How difficult an upgrade would it be? There was
>> enough positive commentary on this plugin I might be willing to give it a
>> go...
>>
>> Robert Kuropkat
>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Trac Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> trac-users+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/cbe877eb-86d7-4e0b-a1b5-a32e033f791bn%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Hi all,
I worked some hours trying to upgrade my TestManagerForTracPlugin to
Python3 and the latest Trac, and after having fixed the deprecated db api
and several other issues I found out that the Genshi template engine has
been replaced with Jinja2 and the ITemplateStreamFilter is no longer
supported. (BTW, the reason seems to be performance problems with Genshi...
Actually we haven't ever faced any in our organization...)

Unfortunately, the plugin is heavily (if not completely) based on
the ITemplateStreamFilter machanism, in order o decorate Wiki pages, and a
bit also the Ticket pages, with the set of contents and controls related to
test catalogs and test cases.
This allows users to leverage the power of the Wiki, and of any other
plugins that augment it, while dealing with test descriptions and metadata.

Rewriting the plugin completely, to replace template filtering with
JavaScript as recommended, besides being an awkward approach, is something
I can't currently undergo, unfortunately.

Roberto

Il giorno mercoledì 12 gennaio 2022 alle 22:11:14 UTC+1 figaro ha scritto:

> Thank you for your efforts nonetheless.
> 'get_db_cnx' happens to be deprecated, and that means that plugin will
> have to be upgraded too.
> As far as I know, no other plugin has been developed and is available on
> trac-hacks that supports testing software.
>
> -- figaro
>
> On Wednesday, 12 January 2022 at 20:02:50 UTC+1 robert....@gmail.com
> wrote:
>
>>
>> Installed QaTrackerPlugin to give it a try. Created a Test Plan
>> (Milestone) and a Test Case (Ticket) and assigned the Test Case to the Test
>> Plan. Tried to create a Test Run in the QA Tracker tab and got an error:
>>
>> AttributeError: 'Environment' object has no attribute
>> 'get_db_cnx'
>>
>> Robert Kuropkat
>>
>>
>> On 1/11/22 4:27 PM, figaro wrote:
>>
>> TestManagerForTracPlugin
>> <https://trac-hacks.org/wiki/TestManagerForTracPlugin> is one of the
>> largest plugins that is publicly available and likely to be a large piece
>> of work to migrate.
>> Depending on your use case, the only other option is
>> https://trac-hacks.org/wiki/QaTrackerPlugin
>>
>> -- figaro
>>
>> On Tuesday, 11 January 2022 at 19:10:18 UTC+1 robert....@gmail.com wrote:
>>
>>>
>>> On 1/11/22 1:07 PM, RjOllos wrote:
>>>
>>>
>>>
>>> On Monday, January 10, 2022 at 11:09:45 AM UTC-8 robert....@gmail.com
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> Trying to install the Test Manager plugin (
>>>> https://trac-hacks.org/wiki/TestManagerForTracPlugin) and can't seem
>>>> to get it to work. Searching implies it should be working, so I must have
>>>> missed something obvious somewhere.
>>>>
>>>> Trac: v1.4.3
>>>> TestManager: 1.9.1-py2.7
>>>> TracGenericClass: 1.1.7-py2.7
>>>> TracGenericWorkflow: 1.0.5.py2.7
>>>> Genshi: 0.7.5
>>>>
>>>> CentOS: 8.4.2105
>>>> Python: 2.7.18
>>>>
>>>> From trac.ini
>>>>
>>>> [components]
>>>> tracgenericclass.* = enabled
>>>> tracgenericworkflow.* = enabled
>>>> testmanager.* = enabled
>>>>
>>>> Permissions on egg files: 644
>>>>
>>>> Apache restarted (multiple times)
>>>>
>>>> Error in trac.log
>>>>
>>>> Trac[loader] ERROR: Skipping "testmanager = testmanager": ImportError:
>>>> cannot import name with_transaction
>>>>
>>>> Any help appreciated.
>>>> Robert Kuropkat
>>>>
>>>
>>> The plugin isn't compatible with Trac 1.4 because it uses deprecated
>>> database access methods that have been removed:
>>> https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges
>>>
>>> Ryan
>>>
>>> --
>>>
>>>
>>> Dude.... I was afraid that would be the answer. Is there a solid
>>> alternative? I can use a separate product, but I was pretty excited about
>>> a built-in Trac option. How difficult an upgrade would it be? There was
>>> enough positive commentary on this plugin I might be willing to give it a
>>> go...
>>>
>>> Robert Kuropkat
>>>
>>>
>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Trac Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> trac-users+...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com
>> <https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a28a4a46-d8a3-4c07-87d1-7bd36d265eb9n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
On Monday, February 7, 2022 at 7:05:50 AM UTC-8 sec...@gmail.com wrote:

> Hi all,
> I worked some hours trying to upgrade my TestManagerForTracPlugin to
> Python3 and the latest Trac, and after having fixed the deprecated db api
> and several other issues I found out that the Genshi template engine has
> been replaced with Jinja2 and the ITemplateStreamFilter is no longer
> supported. (BTW, the reason seems to be performance problems with Genshi...
> Actually we haven't ever faced any in our organization...)
>
> Unfortunately, the plugin is heavily (if not completely) based on
> the ITemplateStreamFilter machanism, in order o decorate Wiki pages, and a
> bit also the Ticket pages, with the set of contents and controls related to
> test catalogs and test cases.
> This allows users to leverage the power of the Wiki, and of any other
> plugins that augment it, while dealing with test descriptions and metadata.
>
> Rewriting the plugin completely, to replace template filtering with
> JavaScript as recommended, besides being an awkward approach, is something
> I can't currently undergo, unfortunately.
>
> Roberto
>

I would treat the 3 changes separately in this order:
1. Deprecated database API (Trac 1.2)
2. Port to Jinja2 (Trac 1.4)
3. Python3 (Trac 1.6)

If you complete just (1), you'll have compatibility with Trac 1.4, which
still supports Genshi in most ways while recommending Jinja2.

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/b5143843-d7d5-45d7-ae21-2d8142fa4698n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
I suspected as much.  Other plugins have complained about Genshi but I
was able to install it and they worked.  So I can imagine some ongoing
degradation there so long as a plugin requires it.

I am still interested in looking into it and have forked the git repo
here: https://github.com/robert-kuropkat/testman4trac just so I can
tinker and learn without mucking up any other effort.

Robert


On 2/7/22 4:00 AM, Roberto Longobardi wrote:
> Hi all,
> I worked some hours trying to upgrade my TestManagerForTracPlugin to
> Python3 and the latest Trac, and after having fixed the deprecated db
> api and several other issues I found out that the Genshi template
> engine has been replaced with Jinja2 and the ITemplateStreamFilter is
> no longer supported. (BTW, the reason seems to be performance problems
> with Genshi... Actually we haven't ever faced any in our organization...)
>
> Unfortunately, the plugin is heavily (if not completely) based on
> the ITemplateStreamFilter machanism, in order o decorate Wiki pages,
> and a bit also the Ticket pages, with the set of contents and controls
> related to test catalogs and test cases.
> This allows users to leverage the power of the Wiki, and of any other
> plugins that augment it, while dealing with test descriptions and
> metadata.
>
> Rewriting the plugin completely, to replace template filtering with
> JavaScript as recommended, besides being an awkward approach, is
> something I can't currently undergo, unfortunately.
>
> Roberto
>
> Il giorno mercoledì 12 gennaio 2022 alle 22:11:14 UTC+1 figaro ha scritto:
>
> Thank you for your efforts nonetheless.
> 'get_db_cnx' happens to be deprecated, and that means that plugin
> will have to be upgraded too.
> As far as I know, no other plugin has been developed and is
> available on trac-hacks that supports testing software.
>
> -- figaro
>
> On Wednesday, 12 January 2022 at 20:02:50 UTC+1
> robert....@gmail.com wrote:
>
>
> Installed QaTrackerPlugin to give it a try.  Created a Test
> Plan (Milestone) and a Test Case (Ticket) and assigned the
> Test Case to the Test Plan.  Tried to create a Test Run in the
> QA Tracker tab and got an error:
>
>             AttributeError: 'Environment' object has no
> attribute 'get_db_cnx'
>
> Robert Kuropkat
>
>
> On 1/11/22 4:27 PM, figaro wrote:
>> TestManagerForTracPlugin
>> <https://trac-hacks.org/wiki/TestManagerForTracPlugin> is one
>> of the largest plugins that is publicly available and likely
>> to be a large piece of work to migrate.
>> Depending on your use case, the only other option is
>> https://trac-hacks.org/wiki/QaTrackerPlugin
>> <https://trac-hacks.org/wiki/QaTrackerPlugin>
>>
>> -- figaro
>>
>> On Tuesday, 11 January 2022 at 19:10:18 UTC+1
>> robert....@gmail.com wrote:
>>
>>
>> On 1/11/22 1:07 PM, RjOllos wrote:
>>>
>>>
>>> On Monday, January 10, 2022 at 11:09:45 AM UTC-8
>>> robert....@gmail.com wrote:
>>>
>>> Hello,
>>>
>>> Trying to install the Test Manager plugin
>>> (https://trac-hacks.org/wiki/TestManagerForTracPlugin
>>> <https://trac-hacks.org/wiki/TestManagerForTracPlugin>)
>>> and can't seem to get it to work. Searching implies
>>> it should be working, so I must have missed
>>> something obvious somewhere.
>>>
>>> Trac: v1.4.3
>>> TestManager: 1.9.1-py2.7
>>> TracGenericClass: 1.1.7-py2.7
>>> TracGenericWorkflow: 1.0.5.py2.7
>>> Genshi: 0.7.5
>>>
>>> CentOS: 8.4.2105
>>> Python: 2.7.18
>>>
>>> From trac.ini
>>>
>>> [components]
>>> tracgenericclass.* = enabled
>>> tracgenericworkflow.* = enabled
>>> testmanager.* = enabled
>>>
>>> Permissions on egg files: 644
>>>
>>> Apache restarted (multiple times)
>>>
>>> Error in trac.log
>>>
>>> Trac[loader] ERROR: Skipping "testmanager =
>>> testmanager": ImportError: cannot import name
>>> with_transaction
>>>
>>> Any help appreciated.
>>> Robert Kuropkat
>>>
>>>
>>> The plugin isn't compatible with Trac 1.4 because it
>>> uses deprecated database access methods that have been
>>> removed:
>>> https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges
>>> <https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.2#DatabaseAPIChanges>
>>>
>>> Ryan
>>> --
>>
>>
>> Dude.... I was afraid that would be the answer.  Is there
>> a solid alternative?  I can use a separate product, but I
>> was pretty excited about a built-in Trac option.  How
>> difficult an upgrade would it be?  There was enough
>> positive commentary on this plugin I might be willing to
>> give it a go...
>>
>> Robert Kuropkat
>>
>>
>> --
>> You received this message because you are subscribed to a
>> topic in the Google Groups "Trac Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe
>> <https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an
>> email to trac-users+...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com
>> <https://groups.google.com/d/msgid/trac-users/f3450c2e-ca85-4d09-a21d-2cf037b60e08n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Trac Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe
> <https://groups.google.com/d/topic/trac-users/1unaoUW2MdQ/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> trac-users+unsubscribe@googlegroups.com
> <mailto:trac-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/a28a4a46-d8a3-4c07-87d1-7bd36d265eb9n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/a28a4a46-d8a3-4c07-87d1-7bd36d265eb9n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/7dffc129-f02e-8107-db1d-0a956d747410%40gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Perhaps Roberto can publish his updates then.  I'd be willing to test
them certainly.  I agree with the order of updates you suggest.  Python
3 is not even a particular interest of mine at the moment, though longer
term it should be.  My installation is still running on Python2.

Robert Kuropkat


On 2/7/22 10:08 AM, RjOllos wrote:
>
>
> On Monday, February 7, 2022 at 7:05:50 AM UTC-8 sec...@gmail.com wrote:
>
> Hi all,
> I worked some hours trying to upgrade my TestManagerForTracPlugin
> to Python3 and the latest Trac, and after having fixed the
> deprecated db api and several other issues I found out that the
> Genshi template engine has been replaced with Jinja2 and
> the ITemplateStreamFilter is no longer supported. (BTW, the reason
> seems to be performance problems with Genshi... Actually we
> haven't ever faced any in our organization...)
>
> Unfortunately, the plugin is heavily (if not completely) based on
> the ITemplateStreamFilter machanism, in order o decorate Wiki
> pages, and a bit also the Ticket pages, with the set of contents
> and controls related to test catalogs and test cases.
> This allows users to leverage the power of the Wiki, and of any
> other plugins that augment it, while dealing with test
> descriptions and metadata.
>
> Rewriting the plugin completely, to replace template filtering
> with JavaScript as recommended, besides being an awkward approach,
> is something I can't currently undergo, unfortunately.
>
> Roberto
>
>
> I would treat the 3 changes separately in this order:
> 1. Deprecated database API (Trac 1.2)
> 2. Port to Jinja2 (Trac 1.4)
> 3. Python3 (Trac 1.6)
>
> If you complete just (1), you'll have compatibility with Trac 1.4,
> which still supports Genshi in most ways while recommending Jinja2.
>
> Ryan
> --
> You received this message because you are subscribed to the Google
> Groups "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to trac-users+unsubscribe@googlegroups.com
> <mailto:trac-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/b5143843-d7d5-45d7-ae21-2d8142fa4698n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/b5143843-d7d5-45d7-ae21-2d8142fa4698n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/b27d2af4-a308-e562-ad0f-5cd291a30daa%40gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
On Monday, February 7, 2022 at 7:26:47 AM UTC-8 robert....@gmail.com wrote:

>
> Perhaps Roberto can publish his updates then.
>

That would be ideal. I'd love to contribute as time allows via GitHub of
trac-hacks. With the code being on Sourceforge, I'm unsure if the code is
really open for contributions.


> I'd be willing to test them certainly. I agree with the order of updates
> you suggest. Python 3 is not even a particular interest of mine at the
> moment, though longer term it should be. My installation is still running
> on Python2.
>
> Robert Kuropkat
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a5c32e7a-0e74-40ae-987f-a777c2681642n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Hi,
I've pushed my latest changes on both the sourceforge and the new GitHub
repo: https://github.com/seccanj/testman4trac

After some tests on Trac 1.4 and Python 2.7 the changes look good.

Please, try them out and let me know if something's wrong.

Thanks
Roberto

Il giorno lunedì 7 febbraio 2022 alle 20:08:22 UTC+1 RjOllos ha scritto:

> On Monday, February 7, 2022 at 7:26:47 AM UTC-8 robert....@gmail.com
> wrote:
>
>>
>> Perhaps Roberto can publish his updates then.
>>
>
> That would be ideal. I'd love to contribute as time allows via GitHub of
> trac-hacks. With the code being on Sourceforge, I'm unsure if the code is
> really open for contributions.
>
>
>> I'd be willing to test them certainly. I agree with the order of updates
>> you suggest. Python 3 is not even a particular interest of mine at the
>> moment, though longer term it should be. My installation is still running
>> on Python2.
>>
>> Robert Kuropkat
>>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4d8a626e-4ba5-4d6c-a684-2cfb49213703n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Thank you for your efforts. Will look into this also over the next few
weeks.

-- figaro

On Tuesday, 8 February 2022 at 00:25:21 UTC+1 sec...@gmail.com wrote:

> Hi,
> I've pushed my latest changes on both the sourceforge and the new GitHub
> repo: https://github.com/seccanj/testman4trac
>
> After some tests on Trac 1.4 and Python 2.7 the changes look good.
>
> Please, try them out and let me know if something's wrong.
>
> Thanks
> Roberto
>
> Il giorno lunedì 7 febbraio 2022 alle 20:08:22 UTC+1 RjOllos ha scritto:
>
>> On Monday, February 7, 2022 at 7:26:47 AM UTC-8 robert....@gmail.com
>> wrote:
>>
>>>
>>> Perhaps Roberto can publish his updates then.
>>>
>>
>> That would be ideal. I'd love to contribute as time allows via GitHub of
>> trac-hacks. With the code being on Sourceforge, I'm unsure if the code is
>> really open for contributions.
>>
>>
>>> I'd be willing to test them certainly. I agree with the order of
>>> updates you suggest. Python 3 is not even a particular interest of mine at
>>> the moment, though longer term it should be. My installation is still
>>> running on Python2.
>>>
>>> Robert Kuropkat
>>>
>>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/10fd3989-b168-4257-9879-6ffbe939c527n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Hi we installed on our TRAC instance but none of our existing test cases
show up on the Test Manage page just Example Catalog.

Clicking on the Test Stat gives an error
*- Trac detected an internal error:*NameError: global name 'env' is not
defined

Any suggestions on if we missed a config item ?

On Monday, February 7, 2022 at 11:04:26 PM UTC-8 figaro wrote:

> Thank you for your efforts. Will look into this also over the next few
> weeks.
>
> -- figaro
>
> On Tuesday, 8 February 2022 at 00:25:21 UTC+1 sec...@gmail.com wrote:
>
>> Hi,
>> I've pushed my latest changes on both the sourceforge and the new GitHub
>> repo: https://github.com/seccanj/testman4trac
>>
>> After some tests on Trac 1.4 and Python 2.7 the changes look good.
>>
>> Please, try them out and let me know if something's wrong.
>>
>> Thanks
>> Roberto
>>
>> Il giorno lunedì 7 febbraio 2022 alle 20:08:22 UTC+1 RjOllos ha scritto:
>>
>>> On Monday, February 7, 2022 at 7:26:47 AM UTC-8 robert....@gmail.com
>>> wrote:
>>>
>>>>
>>>> Perhaps Roberto can publish his updates then.
>>>>
>>>
>>> That would be ideal. I'd love to contribute as time allows via GitHub of
>>> trac-hacks. With the code being on Sourceforge, I'm unsure if the code is
>>> really open for contributions.
>>>
>>>
>>>> I'd be willing to test them certainly. I agree with the order of
>>>> updates you suggest. Python 3 is not even a particular interest of mine at
>>>> the moment, though longer term it should be. My installation is still
>>>> running on Python2.
>>>>
>>>> Robert Kuropkat
>>>>
>>>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/b631690b-50f7-42c7-96b5-75cfaff9df91n%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
On Mon, Mar 14, 2022 at 8:45 AM Steve Sagodi <ssagodi@gmail.com> wrote:

> Hi we installed on our TRAC instance but none of our existing test cases
> show up on the Test Manage page just Example Catalog.
>
> Clicking on the Test Stat gives an error
> *- Trac detected an internal error:*NameError: global name 'env' is not
> defined
>
> Any suggestions on if we missed a config item ?
>

Almost certainly that's a coding error. Could you please locate the
traceback in the log and post it here?
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2BBGpn8bNF4EELF7YTnWaO53iB8bNo%2B9n5dcwud22e%3DQDFo0LA%40mail.gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
Unfortunately you are right, there's still some incompatibility with Trac
1.4.x, which I didn't spot because of an incorrect setup of my test
environment... I was actually testing against a Trac 1.2.x instead... My
bad.

I fixed most of the problems last night and I'm almost ready for a new
release. I just want to perform more extensive tests with Trac versions
1.2, 1.3 and 1.4.

A question for Ryan, though: how old Trac versions do you think it still
makes sense to support? Will it be ok to stop at 1.2 or you think I should
go even backward?

Regards.
Roberto

Il lun 14 mar 2022, 16:49 Ryan Ollos <rjollos@gmail.com> ha scritto:

>
>
> On Mon, Mar 14, 2022 at 8:45 AM Steve Sagodi <ssagodi@gmail.com> wrote:
>
>> Hi we installed on our TRAC instance but none of our existing test cases
>> show up on the Test Manage page just Example Catalog.
>>
>> Clicking on the Test Stat gives an error
>> *- Trac detected an internal error:*NameError: global name 'env' is not
>> defined
>>
>> Any suggestions on if we missed a config item ?
>>
>
> Almost certainly that's a coding error. Could you please locate the
> traceback in the log and post it here?
> https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/CA%2BBGpn8bNF4EELF7YTnWaO53iB8bNo%2B9n5dcwud22e%3DQDFo0LA%40mail.gmail.com
> <https://groups.google.com/d/msgid/trac-users/CA%2BBGpn8bNF4EELF7YTnWaO53iB8bNo%2B9n5dcwud22e%3DQDFo0LA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJkkV1FOBRRtNaVNitcT4Do3oKkDbuQm0%3Dvd7RDqE5-fNXQLkw%40mail.gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
On Monday, March 14, 2022 at 10:09:29 AM UTC-7 sec...@gmail.com wrote:

> Unfortunately you are right, there's still some incompatibility with Trac
> 1.4.x, which I didn't spot because of an incorrect setup of my test
> environment... I was actually testing against a Trac 1.2.x instead... My
> bad.
>
> I fixed most of the problems last night and I'm almost ready for a new
> release. I just want to perform more extensive tests with Trac versions
> 1.2, 1.3 and 1.4.
>
> A question for Ryan, though: how old Trac versions do you think it still
> makes sense to support? Will it be ok to stop at 1.2 or you think I should
> go even backward?
>
> Regards.
> Roberto
>

Supporting back to 1.2 is probably fine since the old version works with
1.0. The 1.4 and 1.5 release lines are currently the only that are
maintained.

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/fe8ac504-e056-46f4-86ee-3933cf83dfcbn%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
OK thanks Ryan.

I'm facing some final problems with Genshi templates in Trac 1.4.3.

It looks like Trac is trying to render my templates with Jinja2 instead of
Genshi...

Is there anything I should do to force Genshi to render my templates?

Here is the stack trace:

18:47:17 Trac[main] DEBUG: Rendering response with template
testmanagerstats.html
18:47:17 Trac[web_ui] DEBUG: TestManagerTemplateProvider init
18:47:17 Trac[wiki] DEBUG: WikiTestManagerInterface init
18:47:17 Trac[workflow] DEBUG: TestManagerWorkflowInterface init
18:47:17 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering
XML/HTML template
Traceback (most recent call last):
File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/trac/web/chrome.py",
line 1706, in _iterable_jinja_content
for chunk in stream:
File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 1357, in __next__
return self._next()
File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 1334, in _buffered_generator
c = next(self._gen)
File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 1125, in generate
yield self.environment.handle_exception()
File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File
"/home/roberto/.cache/Python-Eggs/TestManager-1.10.3-py2.7.egg-tmp/testmanager/templates/testmanagerstats.html",
line 125, in top-level template code
<option value="${m['planid']}|${m['catpath']}">${m['name']}</option>
File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 452, in getitem
return obj[argument]
UndefinedError: 'm' is undefined


And the relevant template code, where it looks like the "py:for" directive
is not understood nor run:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
i18n:domain="testmanager"
>
<xi:include href="layout.html" />
<xi:include href="macros.html" />

# import 'macros.html' as jmacros with context

[...]
<select id="testplan" name="testplan">
<option value="__all">All Test Plans</option>
<py:for each="m in testplans">
<option value="${m['planid']}|${m['catpath']}">${m['name']}</option>
</py:for>
</select>


And the code I use to render the template:

class TestStatsPlugin(Component):
implements(INavigationContributor, IRequestHandler, ITemplateProvider,
IPermissionRequestor)

[...]
def process_request(self, req):
[...]
return 'testmanagerstats.html', data


Any help is appreciated. Thanks.
Roberto



Il giorno lun 14 mar 2022 alle ore 18:12 RjOllos <rjollos@gmail.com> ha
scritto:

>
>
> On Monday, March 14, 2022 at 10:09:29 AM UTC-7 sec...@gmail.com wrote:
>
>> Unfortunately you are right, there's still some incompatibility with Trac
>> 1.4.x, which I didn't spot because of an incorrect setup of my test
>> environment... I was actually testing against a Trac 1.2.x instead... My
>> bad.
>>
>> I fixed most of the problems last night and I'm almost ready for a new
>> release. I just want to perform more extensive tests with Trac versions
>> 1.2, 1.3 and 1.4.
>>
>> A question for Ryan, though: how old Trac versions do you think it still
>> makes sense to support? Will it be ok to stop at 1.2 or you think I should
>> go even backward?
>>
>> Regards.
>> Roberto
>>
>
> Supporting back to 1.2 is probably fine since the old version works with
> 1.0. The 1.4 and 1.5 release lines are currently the only that are
> maintained.
>
> Ryan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/fe8ac504-e056-46f4-86ee-3933cf83dfcbn%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/fe8ac504-e056-46f4-86ee-3933cf83dfcbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJkkV1Exakykj4humfV5ww1DH7Ndcv3RZV8LEcM%3DN0-%2BkPmcow%40mail.gmail.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
On Monday, March 14, 2022 at 11:06:58 AM UTC-7 sec...@gmail.com wrote:

> OK thanks Ryan.
>
> I'm facing some final problems with Genshi templates in Trac 1.4.3.
>
> It looks like Trac is trying to render my templates with Jinja2 instead of
> Genshi...
>
> Is there anything I should do to force Genshi to render my templates?
>
> Here is the stack trace:
>
> 18:47:17 Trac[main] DEBUG: Rendering response with template
> testmanagerstats.html
> 18:47:17 Trac[web_ui] DEBUG: TestManagerTemplateProvider init
> 18:47:17 Trac[wiki] DEBUG: WikiTestManagerInterface init
> 18:47:17 Trac[workflow] DEBUG: TestManagerWorkflowInterface init
> 18:47:17 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering
> XML/HTML template
> Traceback (most recent call last):
> File
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/trac/web/chrome.py",
> line 1706, in _iterable_jinja_content
> for chunk in stream:
> File
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
> line 1357, in __next__
> return self._next()
> File
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
> line 1334, in _buffered_generator
> c = next(self._gen)
> File
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
> line 1125, in generate
> yield self.environment.handle_exception()
> File
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
> line 832, in handle_exception
> reraise(*rewrite_traceback_stack(source=source))
> File
> "/home/roberto/.cache/Python-Eggs/TestManager-1.10.3-py2.7.egg-tmp/testmanager/templates/testmanagerstats.html",
> line 125, in top-level template code
> <option value="${m['planid']}|${m['catpath']}">${m['name']}</option>
> File
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
> line 452, in getitem
> return obj[argument]
> UndefinedError: 'm' is undefined
>
>
> And the relevant template code, where it looks like the "py:for" directive
> is not understood nor run:
>
> <!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xi="http://www.w3.org/2001/XInclude"
> xmlns:i18n="http://genshi.edgewall.org/i18n"
> xmlns:py="http://genshi.edgewall.org/"
> i18n:domain="testmanager"
> >
> <xi:include href="layout.html" />
> <xi:include href="macros.html" />
>
> # import 'macros.html' as jmacros with context
>
> [...]
> <select id="testplan" name="testplan">
> <option value="__all">All Test Plans</option>
> <py:for each="m in testplans">
> <option value="${m['planid']}|${m['catpath']}">${m['name']}</option>
> </py:for>
> </select>
>
>
> And the code I use to render the template:
>
> class TestStatsPlugin(Component):
> implements(INavigationContributor, IRequestHandler, ITemplateProvider,
> IPermissionRequestor)
>
> [...]
> def process_request(self, req):
> [...]
> return 'testmanagerstats.html', data
>
>
> Any help is appreciated. Thanks.
> Roberto
>

You'll need to return:

return 'testmanagerstats.html', data, None

in order to tell Trac that the template being rendered is a Genshi
template. Also, you can't use "import ... jmacros" in a Genshi template,
that's Jinja2 syntax.

https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja#IRequestHandler

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a7b670fa-a7be-453d-9c4b-f425df3a380bn%40googlegroups.com.
Re: Re: TestManagerForTracPlugin not working [ In reply to ]
The previous releases were not compatibile with Trac 1.4 because of a
mistake in setting up my test environment.

I've just fixed all incompatibilities with Trac 1.2 and with Trac 1.4 and
cleaned up all the releases.

Now you will find that:

- Releases 1.9.x are compatible with Trac 0.12.x.
- Releases 1.20.x are compatible with Trac 1.2.x.
- Releases 2.x are compatible with Trac 1.4.x.

Unfortunately there is currently no release compatible with Trac 1.5,
because of the dropped support of Genshi, a technology the plugins are
heavily based on.

Please, refer to the releases page for the available downloads:
https://github.com/seccanj/testman4trac/releases


Kind regards.

Roberto



Il giorno lun 14 mar 2022 alle ore 19:53 RjOllos <rjollos@gmail.com> ha
scritto:

>
>
> On Monday, March 14, 2022 at 11:06:58 AM UTC-7 sec...@gmail.com wrote:
>
>> OK thanks Ryan.
>>
>> I'm facing some final problems with Genshi templates in Trac 1.4.3.
>>
>> It looks like Trac is trying to render my templates with Jinja2 instead
>> of Genshi...
>>
>> Is there anything I should do to force Genshi to render my templates?
>>
>> Here is the stack trace:
>>
>> 18:47:17 Trac[main] DEBUG: Rendering response with template
>> testmanagerstats.html
>> 18:47:17 Trac[web_ui] DEBUG: TestManagerTemplateProvider init
>> 18:47:17 Trac[wiki] DEBUG: WikiTestManagerInterface init
>> 18:47:17 Trac[workflow] DEBUG: TestManagerWorkflowInterface init
>> 18:47:17 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering
>> XML/HTML template
>> Traceback (most recent call last):
>> File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/trac/web/chrome.py",
>> line 1706, in _iterable_jinja_content
>> for chunk in stream:
>> File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 1357, in __next__
>> return self._next()
>> File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 1334, in _buffered_generator
>> c = next(self._gen)
>> File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 1125, in generate
>> yield self.environment.handle_exception()
>> File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 832, in handle_exception
>> reraise(*rewrite_traceback_stack(source=source))
>> File
>> "/home/roberto/.cache/Python-Eggs/TestManager-1.10.3-py2.7.egg-tmp/testmanager/templates/testmanagerstats.html",
>> line 125, in top-level template code
>> <option value="${m['planid']}|${m['catpath']}">${m['name']}</option>
>> File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 452, in getitem
>> return obj[argument]
>> UndefinedError: 'm' is undefined
>>
>>
>> And the relevant template code, where it looks like the "py:for"
>> directive is not understood nor run:
>>
>> <!DOCTYPE html
>> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:xi="http://www.w3.org/2001/XInclude"
>> xmlns:i18n="http://genshi.edgewall.org/i18n"
>> xmlns:py="http://genshi.edgewall.org/"
>> i18n:domain="testmanager"
>> >
>> <xi:include href="layout.html" />
>> <xi:include href="macros.html" />
>>
>> # import 'macros.html' as jmacros with context
>>
>> [...]
>> <select id="testplan" name="testplan">
>> <option value="__all">All Test Plans</option>
>> <py:for each="m in testplans">
>> <option value="${m['planid']}|${m['catpath']}">${m['name']}</option>
>> </py:for>
>> </select>
>>
>>
>> And the code I use to render the template:
>>
>> class TestStatsPlugin(Component):
>> implements(INavigationContributor, IRequestHandler, ITemplateProvider,
>> IPermissionRequestor)
>>
>> [...]
>> def process_request(self, req):
>> [...]
>> return 'testmanagerstats.html', data
>>
>>
>> Any help is appreciated. Thanks.
>> Roberto
>>
>
> You'll need to return:
>
> return 'testmanagerstats.html', data, None
>
> in order to tell Trac that the template being rendered is a Genshi
> template. Also, you can't use "import ... jmacros" in a Genshi template,
> that's Jinja2 syntax.
>
>
> https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja#IRequestHandler
>
> Ryan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/a7b670fa-a7be-453d-9c4b-f425df3a380bn%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/a7b670fa-a7be-453d-9c4b-f425df3a380bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJkkV1HDp0-2j%2BpTFmQ%2Bonm8j88eyiVTk1wp53xY-yRV9gGEYw%40mail.gmail.com.