File tree 2 files changed +0
-20
lines changed
2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change 2
2
from __future__ import (print_function )
3
3
import os
4
4
import sys
5
- import types
6
5
import configparser
7
6
if sys .version_info <= (3 , 0 ):
8
7
print ("Error: Zulip is a Python 3 project, and cannot be run with Python 2." )
32
31
print ("Error accessing Zulip secrets; manage.py in production must be run as the zulip user." )
33
32
sys .exit (1 )
34
33
35
- # Performance Hack: We make the pika.adapters.twisted_connection
36
- # module unavailable, to save ~100ms of import time for most Zulip
37
- # management commands for code we don't use. The correct
38
- # long-term fix for this will be to get a setting integrated
39
- # upstream to disable pika importing this.
40
- # See https://github.com/pika/pika/issues/1128
41
- sys .modules ['pika.adapters.twisted_connection' ] = types .ModuleType (
42
- 'pika.adapters.twisted_connection' )
43
-
44
34
os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "zproject.settings" )
45
35
from django .conf import settings
46
36
from django .core .management import execute_from_command_line
Original file line number Diff line number Diff line change 15
15
"""
16
16
import os
17
17
import sys
18
- import types
19
18
20
19
BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
21
20
sys .path .append (BASE_DIR )
22
21
import scripts .lib .setup_path_on_import
23
22
24
- # Performance Hack: We make the pika.adapters.twisted_connection
25
- # module unavailable, to save ~100ms of import time for most Zulip
26
- # management commands for code we don't use. The correct
27
- # long-term fix for this will be to get a setting integrated
28
- # upstream to disable pika importing this.
29
- # See https://github.com/pika/pika/issues/1128
30
- sys .modules ['pika.adapters.twisted_connection' ] = types .ModuleType (
31
- 'pika.adapters.twisted_connection' )
32
-
33
23
os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "zproject.settings" )
34
24
import django
35
25
django .setup () # We need to call setup to load applications.
You can’t perform that action at this time.
0 commit comments