Update ExtensionInfo to be able to work with or without entrypoints.
Review Request #8288 — Created July 14, 2016 and submitted
ExtensionInfo, the internal class for storing various bits of data about
an extension (paths, names, metadata, etc.) previously required the use
of a Python EntryPoint in order to retrieve the data. This made unit
tests more annoying than they should have been.Now, ExtensionInfo's constructor takes the extension class, package
name, and metadata. A newcreate_from_entrypoint()
class method has
been added for using an EntryPoint. The old constructor still accepts
one as well, but will warn about deprecated usage first.Some unit tests have also been updated to make use of this, and to test
the old behavior (modernizing some of the checks while there).
Djblets and Review Board unit tests pass.
Made use of this with the new, upcoming extension testing support.
Description | From | Last Updated |
---|---|---|
undefined name 'ext_class' |
reviewbot | |
'datetime' imported but unused |
reviewbot | |
'cache' imported but unused |
reviewbot | |
'make_cache_key' imported but unused |
reviewbot | |
local variable 'app_name' is assigned to but never used |
reviewbot | |
local variable 'htdocs_path' is assigned to but never used |
reviewbot | |
local variable 'static_path' is assigned to but never used |
reviewbot |
- Change Summary:
-
Fixed PyFlakes complaints.
- Commit:
-
9590a142ce9d8da2e9d247e0c222b3cf140af554664e3b45372e58d98b83df2fedc38c017767f812