• 
      

    Update ExtensionInfo to be able to work with or without entrypoints.

    Review Request #8288 — Created July 14, 2016 and submitted

    Information

    Djblets
    release-0.10.x
    664e3b4...

    Reviewers

    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 new create_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'

    reviewbotreviewbot

    'datetime' imported but unused

    reviewbotreviewbot

    'cache' imported but unused

    reviewbotreviewbot

    'make_cache_key' imported but unused

    reviewbotreviewbot

    local variable 'app_name' is assigned to but never used

    reviewbotreviewbot

    local variable 'htdocs_path' is assigned to but never used

    reviewbotreviewbot

    local variable 'static_path' is assigned to but never used

    reviewbotreviewbot
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/extensions/extension.py
          djblets/extensions/manager.py
          djblets/extensions/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/extensions/extension.py
          djblets/extensions/manager.py
          djblets/extensions/tests.py
      
      
    2. djblets/extensions/extension.py (Diff revision 1)
       
       
      Show all issues
       undefined name 'ext_class'
      
    3. djblets/extensions/manager.py (Diff revision 1)
       
       
      Show all issues
       'datetime' imported but unused
      
    4. djblets/extensions/manager.py (Diff revision 1)
       
       
      Show all issues
       'cache' imported but unused
      
    5. djblets/extensions/manager.py (Diff revision 1)
       
       
      Show all issues
       'make_cache_key' imported but unused
      
    6. djblets/extensions/tests.py (Diff revision 1)
       
       
      Show all issues
       local variable 'app_name' is assigned to but never used
      
    7. djblets/extensions/tests.py (Diff revision 1)
       
       
      Show all issues
       local variable 'htdocs_path' is assigned to but never used
      
    8. djblets/extensions/tests.py (Diff revision 1)
       
       
      Show all issues
       local variable 'static_path' is assigned to but never used
      
    9. 
        
    david
    1. Aside from the issues that Review Bot found, this looks fine to me.

    2. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/extensions/extension.py
          djblets/extensions/manager.py
          djblets/extensions/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/extensions/extension.py
          djblets/extensions/manager.py
          djblets/extensions/tests.py
      
      
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-0.10.x (219a306)