| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Now, the injection can be prevented by either specifying paths as None
or by initial item in the non-empty iterable being None.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
| |
...in filterdict_* lambdas where (now) _fn_ is a special key.
Also adjust the callers where needed.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
... use "relative to CWD" instead
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Alternatively, in development mode, it is useful to override it using
{PREFIX}_EXTPLUGINS env. variable.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are "native" plugins, such as XML under `format` module.
The problem with these is that once they are dropped
(`PluginRegistry.setup(reset=True)`), they cannot be re-discovered
any more (the first discovery is usually implicit through
the import + metaclass machinery).
Now we can also remove a hack in `PluginRegistry.discovery()` that used
to inject such "native" plugins implicitly (but till the whole registry
got restarted!) if full search was requested.
Thanks to Travis CI for exposing the issue because of the different
ordering of the unit tests (subsequently reproduced at me with
`./run-tests tests.{format_manager.Injection,command_manager.Default}`).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When plugin in question is not tracked yet, but is found in the
dedicated namespace module (as per module:symbol convention),
it is sucked from here rather than applying whole "probe" cycle
resulting in duplicated classes (which should rather be treated
as singletons, anyway).
Possible thanks to 5ed999651ec89bfbc1ab1e8283b40ae2476a02da
that introduced that convention (oh well, which should rather
be enforced programatically).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Apparently, comma-separated values -> tuple is preceded with assert
statement syntactic closure recognition, hence pair of arguments
to assert cannot be enclosed with parentheses (previous assumption was
that it is the same due to syntactically both notations are equivalent).
Reported-by: Tomáš Jelínek" <tojelinek@redhat.com>
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
| |
PluginManager now has an ability to selectively get and initiliaze only
selected plugin(s). What remains to be done is a propagation of this
principle in the commands - filters - formats chain.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
...using primitives from utils.py
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
+ add a note that we could somehow initialize plugins earlier
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
+ modify tests/run_cmd to trigger such a case
Reported-by: Tomáš Jelínek" <tojelinek@redhat.com>
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In fact, commit 8dd14ec29fe829e9edf0102e45966a4a1cc012d7 commented out
what was intentionally present to prevent RuntimeWarning due to
importing discovered plugins to the yet non-existent module namespace
(missing parent) in case the respective registry hadn't been imported
in advance. That commit tried to solve a conflict with protol.py,
which referred to "clufter.plugins" module namespace, but unlike the
previous registries (formats, filters, commands), "plugins" is not
backed by a real module (i.e., neither plugins.py nor
plugins/__init__.py exist at the top level).
Solution is simple, make protocols registry set the namespace as a
non-value, which is then considered a signal not to attempt any
such for-the-sake-of-sanity complementary import.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
+ reflect that on the formats' level (also bring a convention for that)
+ make plugin_registry.probe fnc more tolerant towards non-classes
as we want to differentiate between protocol on instance basis
rather than based on dedicated classes (because we want to
pragmatically maintain interchangeability with plain strings!)
+ make extra steps in protocol.py so the mentioned interchangeability
actually works
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
using MetaPlugin class in the inheritance hierarchy to mark this
fact.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
... making a need to subclass PluginManager explicit
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Generators and list comprehensions should be OK in Python 2.6.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|