====================================== Upgrading to newer versions of Roundup ====================================== Please read each section carefully and edit your tracker home files accordingly. Note that there is information about upgrade procedures in the `administration guide`_. If a specific version transition isn't mentioned here (eg. 0.6.7 to 0.6.8) then you don't need to do anything. If you're upgrading from 0.5.6 to 0.6.8 though, you'll need to check the "0.5 to 0.6" and "0.6.x to 0.6.3" steps. **IMPORTANT** The v1.5.x releases of Roundup were the last to support Python v2.5 and v2.6. Starting with the v1.6 releases of Roundup v2.7.2 is required to run newer releases of Roundup. Contents: .. contents:: :local: Migrating from 1.6.X to 2.0.0 ============================= Upgrade tracker's config.ini file -------------------------------------- Once you have installed the new roundup, use:: roundup-admin -i /path/to/tracker updateconfig newconfig.ini to generate a new ini file preserving all your settings. You can then merge any local comments from the tracker's ``config.ini`` into ``newconfig.ini``. Compare the old and new files and configure any new settings as you want. Then replace ``config.ini`` with the ``newconfig.ini`` file. Python 3 support ---------------- Many of the ``.html`` and ``.py`` files from Roundup that are copied into tracker directories have changed for Python 3 support. If you wish to move an existing tracker to Python 3, you need to merge in those changes. Also you need to make sure that locally created python code in the tracker is correct for Python 3. If your tracker uses the ``anydbm`` or ``mysql`` backends, you also need to export the tracker contents using ``roundup-admin export`` running under Python 2, and them import them using ``roundup-admin import`` running under Python 3. This is detailed in the documention for migrating to a different backend. If using the ``sqlite`` backend, you do not need to export and import, but need to delete the ``db/otks`` and ``db/sessions`` files when changing Python version. If using the ``postgresql`` backend, you do not need to export and import and no other special database-related steps are needed. If you use the whoosh indexer, you will need to reindex. It looks like a database created with Python 2 leads to Unicode decode errors when accessed by Python 3. Reindexing can take a while (see details below look for "reindexing"). Octal values in config.ini change from the Python 2 representation with a leading ``0`` (``022``). They now use a leading ``0o`` (``0o22``). Note that the ``0o`` format is properly handled under python 2. You can use the ``newconfig.ini`` generated using ``python3 roundup-admin -i ... updateconfig newconfig.ini`` if you want to go back to using python 2. (Note going back to Python 2 will require the same steps as moving from 2 to 3 except using Python 3 to perform the export.) Rate Limit New User Registration -------------------------------- The new user registration form can be abused by bots to allow automated registration for spamming. This can be limited by using the new ``config.ini`` ``[web]`` option called ``registration_delay``. The default is 4 and is the number of seconds between the time the form was generated and the time the form is processed. If you do not modify the ``user.register.html`` template in your tracker's html directory, you *must* set this to 0. Otherwise you will see the error: Form is corrupted, missing: opaqueregister. If set to 0, the rate limit check is disabled. If you want to use this, you can change your ``user.register.html`` file to include:: The hidden input field can be placed right after the form declaration that starts with::