Merge into devel : avoid-importing-bzr-plugins-from-site : Code : Launchpad itse...
source link: https://code.launchpad.net/~cjwatson/launchpad/avoid-importing-bzr-plugins-from-site/+merge/335379
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Merge lp:~cjwatson/launchpad/avoid-importing-bzr-plugins-from-site into lp:launchpad
- avoid-importing-bzr-plugins-from-site
- Merge into devel
Proposed by Colin Watson on 2017-12-19
Status:
Merged Merged at revision: 18518 Proposed branch: lp:~cjwatson/launchpad/avoid-importing-bzr-plugins-from-site Merge into: lp:launchpad Diff against target: 78 lines (+16/-19)
To merge this branch: bzr merge lp:~cjwatson/launchpad/avoid-importing-bzr-plugins-from-site Related bugs:
Reviewer Review Type Date Requested Status Colin Watson Approve on 2017-12-19 Review via email: [email protected]
Commit message
Suppress Branch security proxies in lp.codehosting, not lp_sitecustomize.
The latter runs too early to be able to safely import Bazaar plugins.
Description of the change
Python doesn't set up sys.getfilesystemencoding() until shortly after it's finished importing site, so if we try to import Bazaar plugins from a sitecustomize hook then any initialisation calls they make to bzrlib.i18n.load_plugin_translations will fail, causing great confusion. Anything that needs Bazaar plugins is already supposed to import lp.codehosting, so this should be a safe rearrangement.
review: Approve
Self-reviewing since this is a testfix and the test suite should catch anything overly interesting.
Preview Diff
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK