| changeset | 9c3ec0a5c7fc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | chore: remove __future print_funcion from code. Not needed as of Python 3. |
| files |
| changeset | a73ac3752ac5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | refactor: mke Date class use __slots__ This should be the last slotting for a while. Instrumenting roundup-admin and the Client class (running under the waitress wsgi server) shows object count output similar to: [(('IssueClass', 'roundup.backends.back_anydbm'), 128), (('Session', 'roundup.cgi.client'), 128), (('Mailer', 'roundup.mailer'), 128), (('Password', 'roundup.password'), 220), (('LiberalCookie', 'roundup.cgi.client'), 241), (('Database', 'roundup.backends.back_anydbm'), 256), (('FileClass', 'roundup.backends.back_anydbm'), 256), (('Number', 'roundup.hyperdb'), 256), (('PythonExpr', 'roundup.cgi.PageTemplates.PythonExpr'), 274), (('Proptree', 'roundup.hyperdb'), 276), (('Role', 'roundup.security'), 384), (('PathExpr', 'roundup.cgi.PageTemplates.Expressions'), 630), (('Class', 'roundup.backends.back_anydbm'), 640), (('SubPathExpr', 'roundup.cgi.PageTemplates.Expressions'), 645), (('Date', 'roundup.hyperdb'), 678), (('Link', 'roundup.hyperdb'), 934), (('Multilink', 'roundup.hyperdb'), 1024), (('Permission', 'roundup.security'), 6784), (('TruthDict', 'roundup.support'), 6795), (('PrioList', 'roundup.support'), 8192), (('Date', 'roundup.date'), 8610)] where each row is a tuple of (class, module) and the count of the number of object of that class sorted by number of objects. I think the major classes that meet the criteria below are all __slotted__ at this point: Is a native roundup class and not a subclass (e.g. LiberalCookie is subclass of http.cookies.SimpleCookie) Does not touch the database (not hyperdb or backend) Is not part of templating Is not a top level class that may need runtime attributes/methods overwritten e.g Session/Mailer/Password Some of the excluded classes can be slotted, but they are not low hanging fruit and requires more class heirarchy changes or more extensive testing. |
| files |
| changeset | 2bf0c4e7795e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: issue2551390 - Replace text input/calendar popup with native date input Docs, code and test changes for the changeover to a native date element. See issue for details. |
| files |
| changeset | 8f29e4ea05ce |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: issue2551278 - datetime.datetime.utcnow deprecation. Replace calls with equivalent that produces timezone aware dates rather than naive dates. Also some flake8 fixes for test/rest_common.py. |
| files |
| changeset | c27276e0bdce |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 undefined symbol fixes. |
| files |
| changeset | d76291836523 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix issue2551128 - Impossible to validate a user with unknown timezone Raise KeyError when an unrecognized timezones is passed to pytz. (patch Cedric Krier, test John Rouillard) |
| files |
| changeset | 69b1aaf9c51f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | pep8 changes, |
| files |
| changeset | 7d276bb8b46d |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | More invalid escape sequence fixes. |
| files |
| changeset | 936275dfe1fa |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Try to fix: DeprecationWarning: invalid escape sequence \d DeprecationWarning: invalid escape sequence \s DeprecationWarning: invalid escape sequence \) Strings under python 3 are unicode strings rather then "regular" strings as under python 2. So all regexps need to be raw strings. We will see how many I fixed and if I broke any. |
| files |
| changeset | 43970d92323e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add two isoformat() methods. One for Date and one for Interval. This permits the dicttoxml library to print these data types. The dicttoxml library is optional and can be used by the rest interface to support xml output. |
| files |
| changeset | e2382945d302 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: avoid basestring. |
| files |
| changeset | 3fa026621f69 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: comparisons. Python 3 no longer has the cmp function, or cmp= arguments to sorting functions / methods (key= must be used instead), and requires rich comparison methods such as __lt__ to be defined instead of using __cmp__. All of the comparison mechanisms supported in Python 3 are also supported in Python 2. This patch makes the corresponding changes in Roundup to use key functions and rich comparison methods. In the case of the JournalPassword and Permission classes, only __eq__ and __ne__ are defined as I don't see ordered comparisons as useful there (and for Permission, the old __cmp__ function didn't try to provide a valid ordering). In the case of the Date class, I kept the __cmp__ method and implemented the others in terms of it, to avoid excess repetitiveness in duplicating implementation code for all six rich comparison methods. In roundup/admin.py, help_commands_html used operator.attrgetter to produce the second argument of sorted() - which would be reasonable for a key function, but the second argument is the cmp function in Python 2, not a key function (and the key function must be a named argument not a positional argument in Python 3). That function appears to be completely unused, so I expect that code never worked. This patch adds the missing key= to that sorted() call, but it would also be reasonable to remove the unused function completely instead. |
| files |
| changeset | 2120f77554d5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use // and __truediv__ as needed. Tool-assisted patch. Those divisions that I thought must be integer floor divisions and rely on Python 2 integer floor division semantics are changed to use // (if any are actually meant to be floating-point divisions, that would break things). One __div__ method is changed to __truediv__ (with __div__ = __truediv__ for Python 2 compatibility). |
| files |
| changeset | c26d88ec071e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: handle absence of "long" type. Manual patch. |
| files |
| changeset | 64c4e43fbb84 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: numeric literal syntax. Fixes octal constants to use leading 0o, and removes 'L' suffixes. Tool-assisted patch. |
| files |
| changeset | 35ea9b1efc14 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: "raise" syntax. Changing "raise Exception, value" to "raise Exception(value)". Tool-assisted patch. Particular cases to check carefully are the one place in frontends/ZRoundup/ZRoundup.py where a string exception needed to be fixed, and the one in roundup/cgi/client.py involving raising an exception with a traceback (requires three-argument form of raise in Python 2, which as I understand it requires exec() to avoid a Python 3 syntax error). |
| files |
| changeset | 12fe83f90f0d |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use repr() instead of ``. Tool-generated patch. |
| files |
| changeset | 64b05e24dbd8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: convert print to a function. Tool-assisted patch. It is possible that some "from __future__ import print_function" are not in fact needed, if a file only uses print() with a single string as an argument and so would work fine in Python 2 without that import. |
| files |
| changeset | 03505579abef |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Fix bug in (Date- or Interval-) Range parsing Obscure case with only a "from" is now parsed correctly. Obviously it isn't possible to get the three cases with a missing "from" *or* a missing "to" or *both* (in which case the interval has zero length) right in a single regex. This also fixes broken unittests testFilteringRangeInterval and testFilteringRangeTwoSyntaxes (which used that syntax). This was introduced in 07c59221f363 but before that ranges with only a "to" didn't work. |
| files |
| changeset | fe140bc0eaa9 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Implement (and document) timezone offsets |
| files |
| changeset | 07c59221f363 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Make doctests run in date module This needed to fake the "now" time in the doctests to reproduce results. Note that this also fixes some errors in Range parsing discovered during test creation. |
| files |
| changeset | 392a055fdc21 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Thomas Arendsen Hein <thomas@intevation.de> |
| description | issue2117897: Fixed two more rounding to 60.0 seconds in date.py This caused exceptions in real-world data as reported in the issue by Kenny Johansson, Malte Helmert and me. Change them to 59.999 as was done in the fix for issue2550802. |
| files |
| changeset | 8ab5d7d63191 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Bernhard Reiter <bernhard@intevation.de> |
| description | Fixed issue2550802: Fixed date so second fraction can't cause rounding to 60.000 when serialising. Report and fix by Erik Hanspers. |
| files |
| changeset | 6e3e4f24c753 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Eric S. Raymond <esr@thyrsus.com> |
| description | Remove keyword expansions from CVS. All regression tests passed afterwards. |
| files |
| changeset | 34dce76bb202 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Multilink fixes and optimizations: - Optimisation: Late evaluation of Multilinks (only in rdbms backends): previously we materialized each multilink in a Node -- this creates an SQL query for each multilink (e.g. 'files' and 'messages' for each line in the issue index display) -- even if the multilinks aren't displayed. Now we compute multilinks only if they're accessed (and keep them cached). - Add a filter_iter similar to the existing filter call. This feature is considered experimental. This is currently not used in the web-interface but passes all tests for the filter call except sorting by Multilinks (which isn't supported by SQL and isn't a sane concept anyway). When using filter_iter instead of filter this saves a *lot* of SQL queries: Filter returns only the IDs of Nodes in the database, the additional content of a Node has to be fetched in a separate SQL call. The new filter_iter also returns the IDs of Nodes (one by one, it's an iterator) but pre-seeds the cache with the content of the Node. The information needed for seeding the cache is retrieved in the same SQL query as the ids. |
| files |
| changeset | 605f31a596b8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Stefan Seefeld <stefan@seefeld.name> |
| description | Simplify and fix interval comparison. |
| files |
| changeset | 5f82173d1684 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Stefan Seefeld <stefan@seefeld.name> |
| description | Simplify and fix interval comparison. |
| files |
| changeset | ad7176d22f43 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | - add comment to clarify semantics if pytz is installed |
| files |
| changeset | d5e2767d4e91 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Stefan Seefeld <stefan@seefeld.name> |
| description | Robustify Date.set. |
| files |
| changeset | 3d5a0a949107 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Fix granularity stuff so it handles wrapping a lot better. |
| files |
| changeset | 78dc9b275aeb |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | New tests for range searching by specifying just a month. Currently some of them fail. _add_granularity is broken - needs tests and complete fix. |
| files |
| changeset | f5bb1ad47268 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Add a class-method as a constructor of a Date object from a timestamp. The timestamp is not limited by the year-range of common gmtime implementations. |
| files |
| changeset | 7cda5b4daa91 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | fix a deprecation warning if usecs passed to datetime constructor is a float. |
| files |
| changeset | 2a60b68985db |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Fix arbitrary limit on dates. Dates can now be in the year-range 1-9999 for all backends except metakit which is still limited to 1970-2038. |
| files |
| changeset | 842f1a292ff8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Handle rounding of seconds generating invalid date values |
| files |
| changeset | 06d7816976bc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | python 2.6 compatibility |
| files |
| changeset | df7bff6f8a2f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | full timezone support (based on patch [SF#1465296]) |
| files |
| changeset | afda59d5d546 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | prevent generation of new single-digit seconds dates [SF#1429390] |
| files |
| changeset | 86d568dbab55 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | allow single digit seconds in date spec [SF#1447141] |
| files |
| changeset | f47bddab5a49 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | date spec wasn't allowing week intervals |
| files |
| changeset | c75dd71a7963 |
|---|---|
| branch | maint-0.8 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | 9c080e19f307 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | tighten up Date parsing to not allow 'M/D/YY' (or 'D/M/YY) [SF#1290550] |
| files |
| changeset | 9c65e32514aa |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Anthony Baxter <anthonybaxter@users.sourceforge.net> |
| description | types module delenda est |
| files |
| changeset | 4a5893bfd70d |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from maint-0-8 |
| files |
| changeset | ff490d669015 |
|---|---|
| branch | maint-0.8 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | enforce Date year arg to be > 1970 as test checks other pre-release stuff |
| files |
| changeset | ea29d69f7415 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | fix error message formatting in Date.__init__; fix vim modeline |
| files |
| changeset | 368dbeba7bc0 |
|---|---|
| branch | maint-0.8 |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | fix error message formatting in Date.__init__; fix vim modeline |
| files |
| changeset | 62b1a54107e6 |
|---|---|
| branch | maint-0.8 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | 6feac4fcf883 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Various bug fixes. - fix handling of invalid date input [SF#1102165] - retain Boolean selections in edit error handling [SF#1101492] - fix bug in date editing in Metakit - fixed up date spec usage string - note python 2.3 requirement in announcement and installation docs |
| files |
| changeset | d9cc29eee7c5 |
|---|---|
| branch | maint-0.8 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | 145cd31e258b |
|---|---|
| branch | maint-0.7 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | de242e68c69b |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | fix py2.4 strftime() API change bug [SF#1087746] |
| files |
| changeset | ad04cb95e2b0 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | fix Interval.from_seconds() with float argument |
| files |
| changeset | 8a4a2e135a73 |
|---|---|
| branch | maint-0.7 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | 797725ec50c5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | date.Interval() now accepts an Interval as a spec [SF#1041266] |
| files |
| changeset | 770f9fa94c6a |
|---|---|
| branch | maint-0.7 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | eb4e7b8d52a2 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | handle Py2.3+ datetime objects as Date specs [SF#971300] |
| files |
| changeset | 5080ca961b2e |
|---|---|
| branch | maint-0.7 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | merge from HEAD |
| files |
| changeset | 92510df07670 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | *** empty log message *** |
| files |
| changeset | 74b63b1beff1 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | fixes |
| files |