Import integrations inside extension init.

Review Request #14861 — Created March 1, 2026 and submitted

Information

rbintegrations
master

Reviewers

The djblets extension packaging build backend imports extension classes
in order to get metadata, which means that anything imported from the
extension needs to be present at build time, not just runtime.
rbintegrations' extension file was importing all of the individual
integration files, which in turn could import modules from third-party
dependencies.

This change moves those dependencies into the extension's initialize
method so it works with build isolation.

Did a test build.

Summary ID
Import integrations inside extension init.
The djblets extension packaging build backend imports extension classes in order to get metadata, which means that anything imported from the extension needs to be present at build time, not just runtime. rbintegrations' extension file was importing all of the individual integration files, which in turn could import modules from third-party dependencies. This change moves those dependencies into the extension's initialize method so it works with build isolation. Testing Done: Did a test build.
ntwponssmotvmrwulvtomlkxklzxxsll
Description From Last Updated

We should probably get rid of the integrations attribute now since nothing gets put in it, things get registered into …

maubinmaubin
maubin
  1. 
      
  2. rbintegrations/extension.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    We should probably get rid of the integrations attribute now since nothing gets put in it, things get registered into the IntegrationManager instead right? We should also check if we access RBIntegrationsExtension.integrations since that'll likely break now.

    1. Whoops, didn't realize I left the definition there. I've grepped for ".integrations" and there's no other use.

  3. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (1987e5c)