On 08/01/2020 19:33, Roger Oberholtzer wrote:
Is there a guide for the Trac part? Like the obvious things that need to be changed for Trac 1.4? Something with example uses and not just the names of the things to change?
The full list of things that need to be changed:
https://trac.edgewall.org/wiki/TracDev/ApiChanges/1.3
But very few plugins will be affected by all these. More typical
is one or two (or zero!) problems, but not each plugin has the
same problems. So typically it's much more efficient to just try
the plugin and see if anything is broken. Then create a ticket and
ask / figure out why from the error message / looking at the
source and comparing the used APIs to the list. Usually it's quite
obvious. (At least after you've seen a few cases.)
The "obvious" exception is Jinja / Genshi: If the plugin contains
HTML templates these need to be converted.
The guide for that is here:
https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja
A small example of such a conversion for a macro plugin:
https://trac-hacks.org/changeset/17465
More examples:
https://trac-hacks.org/search?q=jinja&noquickjump=1&changeset=on
https://trac-hacks.org/search?q=1.4&noquickjump=1&changeset=on
For very old plugins (pre-1.0) of course more things typically
need to be updated.
https://trac.edgewall.org/wiki/TracDev/ApiChanges
E.g. the most typical problem is probably the deprecated DB APIs:
https://trac.edgewall.org/wiki/TracDev/DatabaseApi#Trac1.0API
Perhaps the Plugins that only work with Python 2 should be moved to a depreciated location? That might make it easier to see which plugins are effected by a move to Python 3.
Since there is no easily testable Python 3 version of Trac yet, I
don't think any plugins are known to work / not work in Python 3.
It will probably be similar as above: Try it and see if it works
etc.
I assume the way to push this forward is for someone to update
the branch rjollos.git@t12130_python3.1:
https://trac.edgewall.org/ticket/12130#comment:51
Simplify it by dropping "six" / Python 2 support, and make sure
all tests pass, so it can be considered for applying to trunk,
tested and released.
Hope this helps,
Peter