Mercurial > p > roundup > code
changeset 3969:905faf52a51f 1.4.3
fix mysql breakage in 1.4.2
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 27 Feb 2008 08:32:51 +0000 |
| parents | 5857cd1a0db9 |
| children | c5376b2f7bbf |
| files | CHANGES.txt doc/announcement.txt doc/upgrading.txt doc/xmlrpc.txt roundup/__init__.py roundup/backends/back_mysql.py roundup/backends/rdbms_common.py setup.py test/test_cgi.py |
| diffstat | 9 files changed, 55 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Tue Feb 19 23:45:33 2008 +0000 +++ b/CHANGES.txt Wed Feb 27 08:32:51 2008 +0000 @@ -1,6 +1,12 @@ This file contains the changes to the Roundup system over time. The entries are given with the most recent entry first. +2008-02-27 1.4.3 +Fixed: +- MySQL backend bug introduced in 1.4.2 (TEXT columns need a size when + being indexed) + + 2008-02-08 1.4.2 Feature: - New config option in mail section: ignore_alternatives allows to
--- a/doc/announcement.txt Tue Feb 19 23:45:33 2008 +0000 +++ b/doc/announcement.txt Wed Feb 27 08:32:51 2008 +0000 @@ -1,26 +1,8 @@ -I'm proud to release version 1.4.2 of Roundup. - -New Features in 1.4.2: +I'm proud to release version 1.4.3 of Roundup. -- New config option in mail section: ignore_alternatives allows to - ignore alternatives besides the text/plain part used for the content - of a message in multipart/alternative attachments. -- Admin copy of error email from mailgw includes traceback (thanks Ulrik - Mikaelsson) -- Messages created through the web are now given an in-reply-to header - when email out to nosy (thanks Martin v. Löwis) -- Nosy messages now include more information about issues (all link - properties with a "name" attribute) (thanks Martin v. Löwis) +Just one bug was fixed in 1.4.3: -And things fixed: - -- Searching date range by supplying just a date as the filter spec -- Handle no time.tzset under Windows (sf #1825643) -- Fix race condition in file storage transaction commit (sf #1883580) -- Make user utils JS work with firstname/lastname again (sf #1868323) -- Fix ZRoundup to work with Zope 2.8.5 (sf #1806125) -- Fix race condition for key properties in rdbms backends (sf #1876683) -- Handle Reject in mailgw final set/create (sf #1826425) +- MySQL backend bug introduced in 1.4.2 If you're upgrading from an older version of Roundup you *must* follow the "Software Upgrade" guidelines given in the maintenance documentation.
--- a/doc/upgrading.txt Tue Feb 19 23:45:33 2008 +0000 +++ b/doc/upgrading.txt Wed Feb 27 08:32:51 2008 +0000 @@ -13,6 +13,18 @@ .. contents:: +Migrating from 1.4.2 to 1.4.3 +============================= + +If you are using the MySQL backend you will need to replace some indexes +that may have been created by version 1.4.2. + +You should to access your MySQL database directly and remove any indexes +with a name ending in "_key_retired_idx". You should then re-add them with +the same spec except the key column name needs a size. So an index on +"_user (__retired, _name)" should become "_user (__retired, _name(255))". + + Migrating from 1.4.x to 1.4.2 =============================
--- a/doc/xmlrpc.txt Tue Feb 19 23:45:33 2008 +0000 +++ b/doc/xmlrpc.txt Wed Feb 27 08:32:51 2008 +0000 @@ -36,35 +36,35 @@ user provide a username and password in the HTTP authorization header in order to authenticate the request against the tracker. -list - :arguments: classname, [property_name] +======= ==================================================================== +Command Description +======= ==================================================================== +list arguments: *classname, [property_name]* List all elements of a given ``classname``. If ``property_name`` is specified, that is the property that will be displayed for each element. If ``property_name`` is not specified the default label property will be used. -display - :arguments: designator, [property_1, ..., property_N] +display arguments: *designator, [property_1, ..., property_N]* Display a single item in the tracker as specified by ``designator`` (e.g. issue20 or user5). The default is to display all properties for the item. Alternatively, a list of properties to display can be specified. -create - :arguments: classname, arg_1 ... arg_N +create arguments: *classname, arg_1 ... arg_N* Create a new instance of ``classname`` with ``arg_1`` through ``arg_N`` as the values of the new instance. The arguments are name=value pairs (e.g. ``status='3'``). -set - :arguments: designator, arg_1 ... arg_N +set arguments: *designator, arg_1 ... arg_N* Set the values of an existing item in the tracker as specified by ``designator``. The new values are specified in ``arg_1`` through ``arg_N``. The arguments are name=value pairs (e.g. ``status='3'``). +======= ==================================================================== sample python client ====================
--- a/roundup/__init__.py Tue Feb 19 23:45:33 2008 +0000 +++ b/roundup/__init__.py Wed Feb 27 08:32:51 2008 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: __init__.py,v 1.49 2007-12-23 01:52:07 richard Exp $ +# $Id: __init__.py,v 1.50 2008-02-27 08:32:50 richard Exp $ '''Roundup - issue tracking for knowledge workers. @@ -68,6 +68,6 @@ ''' __docformat__ = 'restructuredtext' -__version__ = '1.4.2' +__version__ = '1.4.3' # vim: set filetype=python ts=4 sw=4 et si
--- a/roundup/backends/back_mysql.py Tue Feb 19 23:45:33 2008 +0000 +++ b/roundup/backends/back_mysql.py Wed Feb 27 08:32:51 2008 +0000 @@ -1,4 +1,4 @@ -#$Id: back_mysql.py,v 1.74 2007-10-26 01:34:43 richard Exp $ +#$Id: back_mysql.py,v 1.75 2008-02-27 08:32:50 richard Exp $ # # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> # @@ -421,9 +421,19 @@ # TODO: create indexes on (selected?) Link property columns, as # they're more likely to be used for lookup + def add_class_key_required_unique_constraint(self, cn, key): + # mysql requires sizes on TEXT indexes + prop = self.classes[cn].getprops()[key] + if isinstance(prop, String): + sql = '''create unique index _%s_key_retired_idx + on _%s(__retired__, _%s(255))'''%(cn, cn, key) + else: + sql = '''create unique index _%s_key_retired_idx + on _%s(__retired__, _%s)'''%(cn, cn, key) + self.sql(sql) + def create_class_table_key_index(self, cn, key): - ''' create the class table for the given spec - ''' + # mysql requires sizes on TEXT indexes prop = self.classes[cn].getprops()[key] if isinstance(prop, String): sql = 'create index _%s_%s_idx on _%s(_%s(255))'%(cn, key, cn, key)
--- a/roundup/backends/rdbms_common.py Tue Feb 19 23:45:33 2008 +0000 +++ b/roundup/backends/rdbms_common.py Wed Feb 27 08:32:51 2008 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: rdbms_common.py,v 1.195 2008-02-07 05:01:42 richard Exp $ +#$Id: rdbms_common.py,v 1.196 2008-02-27 08:32:50 richard Exp $ """ Relational database (SQL) backend common code. Basics: @@ -562,7 +562,7 @@ # they're more likely to be used for lookup def add_class_key_required_unique_constraint(self, cn, key): - sql = '''create unique index _%s_key_retired_idx + sql = '''create unique index _%s_key_retired_idx on _%s(__retired__, _%s)'''%(cn, cn, key) self.sql(sql)
--- a/setup.py Tue Feb 19 23:45:33 2008 +0000 +++ b/setup.py Wed Feb 27 08:32:51 2008 +0000 @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: setup.py,v 1.99 2007-11-07 21:24:24 richard Exp $ +# $Id: setup.py,v 1.100 2008-02-27 08:32:45 richard Exp $ from distutils.core import setup, Extension from distutils.util import get_platform @@ -352,33 +352,9 @@ '''In this release =============== -The metakit backend has been removed due to lack of maintenance and -presence of good alternatives (in particular sqlite built into Python 2.5) - -Release 1.4.1 removes an old trace of the metakit backend that was -preventing new tracker installation. - -New Features in 1.4.0: +Just one bug was fixed in 1.4.3: -- Roundup has a new xmlrpc frontend that gives access to a tracker using - XMLRPC. -- Dates can now be in the year-range 1-9999 -- Add simple anti-spam recipe to docs -- Allow customisation of regular expressions used in email parsing, thanks - Bruno Damour -- Italian translation by Marco Ghidinelli -- Multilinks take any iterable -- config option: specify port and local hostname for SMTP connections -- Tracker index templating (i.e. when roundup_server is serving multiple - trackers) (sf bug 1058020) -- config option: Limit nosy attachments based on size (Philipp Gortan) -- roundup_server supports SSL via pyopenssl -- templatable 404 not found messages (sf bug 1403287) -- Unauthorized email includes a link to the registration page for - the tracker -- config options: control whether author info/email is included in email - sent by roundup -- support for receiving OpenPGP MIME messages (signed or encrypted) +- MySQL backend bug introduced in 1.4.2 There's also a ton of bugfixes.
--- a/test/test_cgi.py Tue Feb 19 23:45:33 2008 +0000 +++ b/test/test_cgi.py Wed Feb 27 08:32:51 2008 +0000 @@ -8,7 +8,7 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# $Id: test_cgi.py,v 1.33 2007-10-05 03:07:14 richard Exp $ +# $Id: test_cgi.py,v 1.34 2008-02-27 08:32:51 richard Exp $ import unittest, os, shutil, errno, sys, difflib, cgi, re @@ -89,6 +89,7 @@ makeForm(form)) cl.classname = classname cl.nodeid = nodeid + cl.language = ('en',) cl.db = self.db return cl.parsePropsFromForm(create=1) @@ -204,6 +205,7 @@ cl.classname = 'issue' cl.nodeid = issue cl.db = self.db + cl.language = ('en',) item = HTMLItem(cl, 'issue', issue) self.assertEqual(item.status.id, '1') self.assertEqual(item.status.name, '2') @@ -222,6 +224,7 @@ cl.classname = 'issue' cl.nodeid = issue cl.db = self.db + cl.language = ('en',) cl.userid = '1' item = HTMLItem(cl, 'issue', issue) for keyword in item.keyword: @@ -304,6 +307,7 @@ cl.classname = 'issue' cl.nodeid = None cl.db = self.db + cl.language = ('en',) self.assertEqual(cl.parsePropsFromForm(create=1), ({('issue', None): {'nosy': ['1','2', '3']}}, [])) @@ -606,6 +610,7 @@ cl.nodeid = '1' cl.db = self.db cl.userid = '2' + cl.language = ('en',) return cl def testClassPermission(self):
