Show More
@@ -40,6 +40,7 b' from rhodecode.lib import ext_json' | |||||
40 | from rhodecode.lib.utils2 import safe_str |
|
40 | from rhodecode.lib.utils2 import safe_str | |
41 | from rhodecode.lib.plugins.utils import get_plugin_settings |
|
41 | from rhodecode.lib.plugins.utils import get_plugin_settings | |
42 | from rhodecode.model.db import User, UserApiKeys |
|
42 | from rhodecode.model.db import User, UserApiKeys | |
|
43 | from rhodecode.config.patches import inspect_getargspec | |||
43 |
|
44 | |||
44 | log = logging.getLogger(__name__) |
|
45 | log = logging.getLogger(__name__) | |
45 |
|
46 | |||
@@ -186,7 +187,6 b' def request_view(request):' | |||||
186 | exposed method |
|
187 | exposed method | |
187 | """ |
|
188 | """ | |
188 | # cython compatible inspect |
|
189 | # cython compatible inspect | |
189 | from rhodecode.config.patches import inspect_getargspec |
|
|||
190 | inspect = inspect_getargspec() |
|
190 | inspect = inspect_getargspec() | |
191 |
|
191 | |||
192 | # check if we can find this session using api_key, get_by_auth_token |
|
192 | # check if we can find this session using api_key, get_by_auth_token |
@@ -328,8 +328,8 b' def get_method(request, apiuser, pattern' | |||||
328 | ] |
|
328 | ] | |
329 | error : null |
|
329 | error : null | |
330 | """ |
|
330 | """ | |
331 |
from rhodecode.config |
|
331 | from rhodecode.config import patches | |
332 | inspect = inspect_getargspec() |
|
332 | inspect = patches.inspect_getargspec() | |
333 |
|
333 | |||
334 | if not has_superadmin_permission(apiuser): |
|
334 | if not has_superadmin_permission(apiuser): | |
335 | raise JSONRPCForbidden() |
|
335 | raise JSONRPCForbidden() |
@@ -35,7 +35,7 b' from pyramid.renderers import render_to_' | |||||
35 | from rhodecode.model import meta |
|
35 | from rhodecode.model import meta | |
36 | from rhodecode.config import patches |
|
36 | from rhodecode.config import patches | |
37 |
|
37 | |||
38 | from rhodecode.config.environment import load_pyramid_environment |
|
38 | from rhodecode.config.environment import load_pyramid_environment, propagate_rhodecode_config | |
39 |
|
39 | |||
40 | import rhodecode.events |
|
40 | import rhodecode.events | |
41 | from rhodecode.config.config_maker import sanitize_settings_and_apply_defaults |
|
41 | from rhodecode.config.config_maker import sanitize_settings_and_apply_defaults | |
@@ -99,6 +99,7 b' def make_pyramid_app(global_config, **se' | |||||
99 |
|
99 | |||
100 | # Apply compatibility patches |
|
100 | # Apply compatibility patches | |
101 | patches.inspect_getargspec() |
|
101 | patches.inspect_getargspec() | |
|
102 | patches.repoze_sendmail_lf_fix() | |||
102 |
|
103 | |||
103 | load_pyramid_environment(global_config, settings) |
|
104 | load_pyramid_environment(global_config, settings) | |
104 |
|
105 |
@@ -158,3 +158,10 b' def inspect_getargspec():' | |||||
158 | inspect.getargspec = inspect.getfullargspec |
|
158 | inspect.getargspec = inspect.getfullargspec | |
159 |
|
159 | |||
160 | return inspect |
|
160 | return inspect | |
|
161 | ||||
|
162 | ||||
|
163 | def repoze_sendmail_lf_fix(): | |||
|
164 | from repoze.sendmail import encoding | |||
|
165 | from email.policy import SMTP | |||
|
166 | ||||
|
167 | encoding.encode_message = lambda message, *args, **kwargs: message.as_bytes(policy=SMTP) |
@@ -27,10 +27,11 b' Celery loader, run with::' | |||||
27 | --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler \ |
|
27 | --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler \ | |
28 | --loglevel DEBUG --ini=.dev/dev.ini |
|
28 | --loglevel DEBUG --ini=.dev/dev.ini | |
29 | """ |
|
29 | """ | |
30 | from rhodecode.config.patches import inspect_getargspec, inspect_formatargspec |
|
30 | from rhodecode.config import patches | |
31 | inspect_getargspec() |
|
31 | patches.inspect_getargspec() | |
32 | inspect_formatargspec() |
|
32 | patches.inspect_formatargspec() | |
33 | # python3.11 inspect patches for backward compat on `paste` code |
|
33 | # python3.11 inspect patches for backward compat on `paste` code | |
|
34 | patches.repoze_sendmail_lf_fix() | |||
34 |
|
35 | |||
35 | import sys |
|
36 | import sys | |
36 | import logging |
|
37 | import logging |
General Comments 0
You need to be logged in to leave comments.
Login now