| changeset | 2a7c3eeaf167 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | feat: add templating utils method dynamically; method to set http code Added new utils.set_http_response(integer) to set the HTML response code from a template. Useful for error handling inside template. Also noted that a real TemplatingUtils (like set_http_response) method gets the TemplatingUtils object instance, but there is no way to do this with registerUtil() from an extension file. Added new instance.registerUtilMethod() method to register a function in an extension as a method passing the client instance in as the first parameter (aka self). |
| files |
| changeset | 586f76eb33e8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: keep python2 working a little longer. |
| files |
| changeset | 1045425c23b2 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | refactor!: replace os.listdir() with os.scandir() In many places we did a listdir() then a stat to see if it's a file or directory. This change removes the need for the stat call. Also for larger directories, scandir() is an iterator, so less memory use. There is one remnant of listdir used in an error handler. That requires a stat on each element in the directory, so there is no benefit to using scandir() other than a slight memory saving on a rarely used piece of code. BREAKING CHANGE: Python 2 requires installation of scandir pip package after this commit. |
| files |
| changeset | 78585199552a |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | merge default trunk into branch |
| files |
| changeset | 771d7c43c76f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | refactor: issue2551293 - remove schema_hook from Tracker instance. Not used, obsolete. |
| files |
| changeset | 82bbb95e5690 |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | merge from tip into issue2550923_computed_property |
| files |
| changeset | 07ce4e4110f5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 fixes: whitespace, remove unused imports |
| files |
| changeset | ca90f7270cd4 |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | merge from main tip. This should fix test failure in Markdown2TestCase.test_string_markdown_code_block_attribute by merging html diff method used in tests. |
| files |
| changeset | 408fd477761f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Add i18n object to roundupdb.Database This makes the i18n object accessible everywhere (including in detectors where localized error messages were impossible). See issue2551184 |
| files |
| changeset | e1588ae185dc |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | merge from default branch. Fix travis.ci so CI builds don't error out |
| files |
| changeset | b78c45828e42 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | post_init must be called on the database .. otherwise things set up in post_init (notably rev_multilink properties) will be missing. Note that post_init is idempotent and can be called multiple times. |
| files |
| changeset | 9906ab204610 |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | merge from trunk. travisci xenil plus more |
| files |
| changeset | 30358e334232 |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | merge trunk changes into this branch |
| files |
| changeset | 808f7a8ed2b6 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Clean leaking file descriptors. Eliminates ResourceWarnings. |
| files |
| changeset | fbce23af2120 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Test case for backend not defined; remove unreachable code Verify that error is raised in configuration.py if backend is not defined in config.ini. Remove unreachable code from instance.py that detects that backend is not defined. It hasn't been reachable since version 1.6.1 because the configuration.py module made the backend option mandatory. Hence configuration.py raises the error and never passes control back to the unreachable code. |
| files |
| changeset | 1a15089c2e49 |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Merge trunk into branch |
| files |
| changeset | 778a9f455067 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Remove old code import imp, old style trackers db/backend_name Module imp is depricated. Removing that means rewriting old style trackers that used imp to load schema and config files. So removed code supporting old style trackers that have been depricated since 2008. Added test to verify that existence of dbinit.py triggers alert that tracker is old style and not supported. Also remove support for depricated db/backend_name file for specifying backend. It is now specified in config.ini's [rdbms] backend. It looks like not specifying an [rdbms] backend key in config.ini throws a config error. However I left in a check and throw an exception with details if there is an empty backend value. But I don't think it will ever be triggered. Removed unused import of imp in a number of test files. |
| files |
| changeset | 1e5ed659e8ca |
|---|---|
| branch | issue2550923_computed_property |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Initial implementation of Computed property It supports query/display in html, rest and xml interfaces. You can specify a cache parameter, but using it raises NotImplementedError. It does not support: search, sort or grouping by the computed field. Checking in on a branch to get more eyeballs on it and maybe some people to help. |
| files |
| changeset | c177e7128dc9 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551083 Replace BaseException and Exception with RoundupException issue2551083 - Replace BaseException and Exception as base classes with new RoundupException (inheriting from Exception) for most roundup exceptions. |
| files |
| changeset | 8ccb41b477d1 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Flake8 cleanup. Formating only no code changes. |
| files |
| changeset | 5258e89e896a |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working |
| files |
| changeset | 5a871a250670 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use isinstance(x, collections.Callable) instead of callable(x). Tool-assisted patch. |
| files |
| changeset | 23b8e6067f7c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: update calls to dict methods. Tool-assisted patch. Changes of iterkeys / itervalues / iteritems to keys / values / items are fully automated, but may make things less efficient in Python 2. Automated tools want to add list() around many calls to keys / values / items, but I thought most such list() additions were unnecessary because it seemed the result of keys / values / items was just iterated over while the set of dict keys remained unchanged, rather than used in a way requiring an actual list, or used while the set of keys in the dict could change. It's quite possible I missed some cases where list() was really needed, or left in some unnecessary list() calls. In cases where list() was only needed because the resulting list was then sorted in-place, I changed the code to use calls to sorted(). |
| files |
| changeset | 6fbb7d52e38f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use open() instead of file(). Tool-assisted patch. Note one case where a simple substitution did not suffice because the change was in a class that defined its own open() method earlier, and thus needed to use builtins.open (respectively __builtin__.open in Python 2). |
| files |
| changeset | 0942fe89e82e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: change "x.has_key(y)" to "y in x". (Also likewise "not in" where appropriate.) Tool-generated 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 | 32f95ec6bd8e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Python 2 and 3 support. Convert Exception into BaseException in core code. |
| files |
| changeset | 6a4317738a90 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | make roundup-admin init function set the transaction source. Otherwise when initial_data.py is loaded as part of init, db.tx_Source is set to None and thus checks like db.tx_Source in [ 'cli' ] will fail. |
| files |
| changeset | e424987d294a |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add support for an integer type to join the existing number type. Commit patch supplied for issue2550886. This can be used for properties used for ordering, counts etc. where a decimal point isn't needed. Developed by Anthony (antmail). Doc updates written by John Rouillard. |
| files |
| changeset | 5251e97b1de0 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Kristensen <john@jerrykan.com> |
| description | Configure the database backend in the config.ini The database backend is currently configured in the 'db/backend_name' file which is just another file that needs to be configured when setting up or migrating a tracker instance. By moving this setting into the config.ini it helps to reduce the number of files that need to be configured and is more logical place for users to find the setting. |
| files |
| changeset | 01d14361cae7 |
|---|---|
| branch | routing |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Transform instance.web_handlers to list to maintain order |
| files |
| changeset | 082ee3ded101 |
|---|---|
| branch | routing |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Improve docs for registerHandler |
| files |
| changeset | 7920d700e580 |
|---|---|
| branch | routing |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Add support for extensions to provide custom pages to Roundup and update CHANGES.txt 1. Added registerHandler() extension point to instance.Tracker to register URL handlers for specific routes 2. Added processing of extension routes to client.cgi 3. Added example plugins/extensions/custompage.py |
| files |
| changeset | 6e9b9743de89 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Implementation for: http://issues.roundup-tracker.org/issue2550731 Add mechanism for the detectors to be able to tell the source of the data changes. Support for tx_Source property on database handle. Can be used by detectors to find out the source of a change in an auditor to block changes arriving by unauthenticated mechanisms (e.g. plain email where headers can be faked). The property db.tx_Source has the following values: * None - Default value set to None. May be valid if it's a script that is created by the user. Otherwise it's an error and indicates that some code path is not properly setting the tx_Source property. * "cli" - this string value is set when using roundup-admin and supplied scripts. * "web" - this string value is set when using any web based technique: html interface, xmlrpc .... * "email" - this string value is set when using an unauthenticated email based technique. * "email-sig-openpgp" - this string value is set when email with a valid pgp signature is used. (*NOTE* the testing for this mode is incomplete. If you have a pgp infrastructure you should test and verify that this is properly set.) This also includes some (possibly incomplete) tests cases for the modes above and an example of using ts_Source in the customization.txt document. |
| files |
| changeset | e339583eae8e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | templating: rename precompileTemplates to precompile |
| files |
| changeset | f7e68ae4926c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Restore compatibility with an old style trackers (not sure if they work at all). |
| files |
| changeset | ec359e7c6c95 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Rename templating.get_templates to get_loader |
| files |
| changeset | fd72576e07ed |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | API break: rename Templates to Loader for zopetal and chameleon engines. |
| files |
| changeset | 48b73776601c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Cheer Xiao <xiaqqaix@gmail.com> |
| description | More fix for improvements on instance.py. Loading of schema.py with "optimize" set didn't honor libdir, which is inconsistent with loading of schema.py with "optimize" unset and loading of other files in tracker home. |
| files |
| changeset | 7b7cfb4b00eb |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Fix improvements on instance.py. Variable libdir must be set before call to load_interfaces. |
| files |
| changeset | 7017c8dd704c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Small improvements on instance.py by Cheer Xiao. - _load_python split into three functions: _compile, _exec and _execfile, mimicing corresponding builtin functions; also the os.path fiddling is isolated to _exec, the motivation being that lib/ should be available for interfaces.py besides extensions and detectors. - all variables named `vars` are renamed to `env` as "vars" shadows the builtin with the same name. |
| files |
| changeset | a2eb4fb3e6d8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | New Chameleon templating engine, engine is now configurable. We now have two configurable templating engines, the old Zope TAL templates (called zopetal in the config) and the new Chameleon (called chameleon in the config). A new config-option "template_engine" under [main] can take these config-options, the default is zopetal. Thanks to Cheer Xiao for the idea of making this configurable *and* for the actual implementation! Cheer Xiao commit log: - The original TAL engine ported from Zope is thereafter referred to as "zopetal", in speech and in code - A new option "template_engine" under [main] introduced - Zopetal-specific code stripped from cgi/templating.py to form the new cgi/engine_zopetal.py - Interface to Chameleon in cgi/engine_chameleon.py - Engines are supposed to provide a Templates class that mimics the behavior of the old cgi.templating.Templates. The Templates class is preferably subclassed from cgi.templating.TemplatesBase. - New function cgi.templating.get_templates to get the appropriate engine's Templates instance according to the engine name |
| files |
| changeset | 760483ce731e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Fix override of TemplatingUtils in instance.py. Thanks to Cheer Xiao for the patch. |
| files |
| changeset | 0fa45d39efee |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Bernhard Reiter <Bernhard.Reiter@intevation.de> |
| description | Removed superfluous import. |
| files |
| changeset | 996cc758f704 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | the "file" alias was introduced some time after this code was written |
| files |
| changeset | 51aa98cda2cf |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Bernhard Reiter <Bernhard.Reiter@intevation.de> |
| description | Do not depend on a CPython implementation detail anymore... ...to make Roundup more compatible with other Python implementation like PyPy. Closes issue2550707. Thanks to Christof Meerwald. |
| files |
| changeset | 80a9295a60fd |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Fix setting of sys.path when importing schema.py, fixes issue2550675, thanks to Bryce L Nordgren for reporting. |
| files |
| changeset | b9eb72f20b4d |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | typo |
| files |
| changeset | 72db88cb68b0 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | doc tweak |
| files |
| changeset | a0be2bc223f5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | use config.DATABASE in cases where 'db' was still hard-coded - in instance when determining the backend - during init after nuking the db it would create 'db' |
| files |
| changeset | 2b75274936bc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Stefan Seefeld <stefan@seefeld.name> |
| description | Add schema consistency checks. |
| files |
| changeset | 61cf00ca920a |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Process each message through the mail gateway as a separate transaction. The mail-gateway used to process messages fetched, e.g., via imap in a single big transaction. Now we process each message coming in via the mail-gateway in its own transaction. Regression-tests passed. See also discussion: http://thread.gmane.org/gmane.comp.bug-tracking.roundup.user/9500 |
| files |
| changeset | bbab97f8ffb2 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Stefan Seefeld <stefan@seefeld.name> |
| description | XMLRPC improvements: * Add support for actions to XMLRPC interface. * Provide bridge so user actions may be executed either via CGI or XMLRPC. * Adjust XMLRPC tests to recent work. * Cleanup. |
| files |
| changeset | 74aebbbea305 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Sorry for the mega-patch - was all done on the train: - handling of required for booelan False and numeric 0 [SF#1608200] - removed bogus args attr of ConfigurationError [SF#1608056] - implemented start_response in roundup.cgi [SF#1604304] |
| files |
| changeset | 46e3d5d0901d |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | ... ooops ... |
| files |
| changeset | 21ff756e4549 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Fixes for directory handling. alexander smishlajev wrote: > wouldn't it be better to sys.path.remove(dirpath)? what if an > extension module modifies sys.path itself? Done. I'm no longer using del sys.path[1] alexander smishlajev wrote: > you shouldn't keep the lib directory in sys.path. if the server runs > several trackers, they will get confused. taking in account that > tracker instantiation order is virtually random, the things can get > quite weird. > > besides, long-running server process may instantiate each tracker more > than once. sys.path will grow longer and longer. Done. It was necessary to do basically the same thing for optimized and non-optimized settings -- at some point if it grows longer we might want to factor this... |
| files |
| changeset | bf660e65ba45 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Directory structure changes. - Implement common directory for imports <tracker_home>/lib - put directory currently being scanned for modules onto the module path -- add "extension" directory when scanning extension, and detectors when scanning detectors. See also thread discussing these modifications at http://comments.gmane.org/gmane.comp.bug-tracking.roundup.devel/4450 Note that I currently *do not* remove the lib directory from sys.path |
| files |
| changeset | 9c8de04a76b1 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | unit test fixes |
| files |
| changeset | 6574d6736b57 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | register all backend modules for old-style trackers |
| files |
| changeset | f50b867747c9 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | if optimize is set, load the schema file in __init__()... ...and then use compiled code object to apply the schema when the database is open. |
| files |