diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py
index 4bd4876c..1283a71c 100644
--- a/rhodecode/lib/helpers.py
+++ b/rhodecode/lib/helpers.py
@@ -22,6 +22,7 @@ Helper functions
Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to both as 'h'.
"""
+
import base64
import collections
@@ -48,31 +49,58 @@ import fnmatch
from datetime import datetime
from functools import partial
from pygments.formatters.html import HtmlFormatter
-from pygments.lexers import (
- get_lexer_by_name, get_lexer_for_filename, get_lexer_for_mimetype)
+from pygments.lexers import get_lexer_by_name, get_lexer_for_filename, get_lexer_for_mimetype
from tempita import looper
from webhelpers2.html import literal, HTML, escape
from webhelpers2.html._autolink import _auto_link_urls
-from webhelpers2.html.tools import (
- button_to, highlight, js_obfuscate, strip_links, strip_tags)
+from webhelpers2.html.tools import button_to, highlight, js_obfuscate, strip_links, strip_tags
from webhelpers2.text import (
- chop_at, collapse, convert_accented_entities,
- convert_misc_entities, lchop, plural, rchop, remove_formatting,
- replace_whitespace, urlify, truncate, wrap_paragraphs)
+ chop_at,
+ collapse,
+ convert_accented_entities,
+ convert_misc_entities,
+ lchop,
+ plural,
+ rchop,
+ remove_formatting,
+ replace_whitespace,
+ urlify,
+ truncate,
+ wrap_paragraphs,
+)
from webhelpers2.date import time_ago_in_words
from webhelpers2.html.tags import (
- _input, NotGiven, _make_safe_id_component as safeid,
+ _input,
+ NotGiven,
+ _make_safe_id_component as safeid,
form as insecure_form,
- auto_discovery_link, checkbox, end_form, file,
- hidden, image, javascript_link, link_to, link_to_if, link_to_unless, ol,
- stylesheet_link, submit, text, password, textarea,
- ul, radio, Options)
+ auto_discovery_link,
+ checkbox,
+ end_form,
+ file,
+ hidden,
+ image,
+ javascript_link,
+ link_to,
+ link_to_if,
+ link_to_unless,
+ ol,
+ stylesheet_link,
+ submit,
+ text,
+ password,
+ textarea,
+ ul,
+ radio,
+ Options,
+)
from webhelpers2.number import format_byte_size
+
# python3.11 backport fixes for webhelpers2
from rhodecode import ConfigGet
from rhodecode.lib._vendor.webhelpers_backports import raw_select
@@ -82,15 +110,22 @@ from rhodecode.lib.action_parser import action_parser
from rhodecode.lib.html_filters import sanitize_html
from rhodecode.lib.pagination import Page, RepoPage, SqlPage
from rhodecode.lib import ext_json
-from rhodecode.lib.ext_json import json, formatted_str_json
+from rhodecode.lib.ext_json import json
from rhodecode.lib.str_utils import safe_bytes, convert_special_chars, base64_to_str
from rhodecode.lib.utils import repo_name_slug, get_custom_lexer
from rhodecode.lib.str_utils import safe_str
from rhodecode.lib.utils2 import (
str2bool,
- get_commit_safe, datetime_to_time, time_to_datetime, time_to_utcdatetime,
- AttributeDict, safe_int, md5, md5_safe, get_host_info)
-from rhodecode.lib.pyramid_utils import get_current_request
+ get_commit_safe,
+ datetime_to_time,
+ time_to_datetime,
+ time_to_utcdatetime,
+ AttributeDict,
+ safe_int,
+ md5,
+ md5_safe,
+ get_host_info,
+)
from rhodecode.lib.markup_renderer import MarkupRenderer, relative_links
from rhodecode.lib.vcs.exceptions import CommitDoesNotExistError
from rhodecode.lib.vcs.backends.base import BaseChangeset, EmptyCommit
@@ -123,23 +158,22 @@ def asset(path, ver=None, **kwargs):
query = {}
query.update(kwargs)
if ver:
- query = {'ver': ver}
- return request.static_path(
- f'rhodecode:public/{path}', _query=query)
+ query = {"ver": ver}
+ return request.static_path(f"rhodecode:public/{path}", _query=query)
default_html_escape_table = {
- ord('&'): '&',
- ord('<'): '<',
- ord('>'): '>',
- ord('"'): '"',
- ord("'"): ''',
+ ord("&"): "&",
+ ord("<"): "<",
+ ord(">"): ">",
+ ord('"'): """,
+ ord("'"): "'",
}
-def html_escape(text, html_escape_table=default_html_escape_table):
+def html_escape(input_text, html_escape_table=default_html_escape_table):
"""Produce entities within text."""
- return text.translate(html_escape_table)
+ return input_text.translate(html_escape_table)
def str_json(*args, **kwargs):
@@ -156,7 +190,7 @@ def chop_at_smart(s, sub, inclusive=False, suffix_if_chopped=None):
If ``inclusive`` is true, truncate just after ``sub`` rather than at it.
"""
- suffix_if_chopped = suffix_if_chopped or ''
+ suffix_if_chopped = suffix_if_chopped or ""
pos = s.find(sub)
if pos == -1:
return s
@@ -173,15 +207,15 @@ def chop_at_smart(s, sub, inclusive=False, suffix_if_chopped=None):
return chopped
-def shorter(text, size=20, prefix=False):
- postfix = '...'
- if len(text) > size:
+def shorter(input_text, size=20, prefix=False):
+ postfix = "..."
+ if len(input_text) > size:
if prefix:
# shorten in front
- return postfix + text[-(size - len(postfix)):]
+ return postfix + input_text[-(size - len(postfix)) :]
else:
- return text[:size - len(postfix)] + postfix
- return text
+ return input_text[: size - len(postfix)] + postfix
+ return input_text
def reset(name, value=None, id=NotGiven, type="reset", **attrs):
@@ -192,7 +226,6 @@ def reset(name, value=None, id=NotGiven, type="reset", **attrs):
def select(name, selected_values, options, id=NotGiven, **attrs):
-
if isinstance(options, (list, tuple)):
options_iter = options
# Handle old value,label lists ... where value also can be value,label lists
@@ -203,7 +236,7 @@ def select(name, selected_values, options, id=NotGiven, **attrs):
elif isinstance(opt, str):
value = label = opt
else:
- raise ValueError('invalid select option type %r' % type(opt))
+ raise ValueError("invalid select option type %r" % type(opt))
if isinstance(value, (list, tuple)):
option_group = options.add_optgroup(label)
@@ -213,7 +246,7 @@ def select(name, selected_values, options, id=NotGiven, **attrs):
elif isinstance(opt2, str):
group_value = group_label = opt2
else:
- raise ValueError('invalid select option type %r' % type(opt2))
+ raise ValueError("invalid select option type %r" % type(opt2))
option_group.add_option(group_label, group_value)
else:
@@ -235,7 +268,7 @@ def FID(raw_id, path):
:param path:
"""
- return 'c-%s-%s' % (short_id(raw_id), md5_safe(path)[:12])
+ return "c-%s-%s" % (short_id(raw_id), md5_safe(path)[:12])
class _GetError(object):
@@ -256,7 +289,6 @@ get_error = _GetError()
class _ToolTip(object):
-
def __call__(self, tooltip_title, trim_at=50):
"""
Special function just to wrap our text into nice formatted
@@ -265,7 +297,7 @@ class _ToolTip(object):
:param tooltip_title:
"""
tooltip_title = escape(tooltip_title)
- tooltip_title = tooltip_title.replace('<', '<').replace('>', '>')
+ tooltip_title = tooltip_title.replace("<", "<").replace(">", ">")
return tooltip_title
@@ -274,12 +306,20 @@ tooltip = _ToolTip()
files_icon = ''
-def files_breadcrumbs(repo_name, repo_type, commit_id, file_path, landing_ref_name=None, at_ref=None,
- limit_items=False, linkify_last_item=False, hide_last_item=False,
- copy_path_icon=True):
-
+def files_breadcrumbs(
+ repo_name,
+ repo_type,
+ commit_id,
+ file_path,
+ landing_ref_name=None,
+ at_ref=None,
+ limit_items=False,
+ linkify_last_item=False,
+ hide_last_item=False,
+ copy_path_icon=True,
+):
if at_ref:
- route_qry = {'at': at_ref}
+ route_qry = {"at": at_ref}
default_landing_ref = at_ref or landing_ref_name or commit_id
else:
route_qry = None
@@ -295,14 +335,15 @@ def files_breadcrumbs(repo_name, repo_type, commit_id, file_path, landing_ref_na
repo_name,
repo_type,
f_path=None, # None here is a special case for SVN repos,
- # that won't prefix with a ref
+ # that won't prefix with a ref
ref_name=default_landing_ref,
commit_id=commit_id,
- query=route_qry
- )
- )]
+ query=route_qry,
+ ),
+ )
+ ]
- path_segments = file_path.split('/')
+ path_segments = file_path.split("/")
last_cnt = len(path_segments) - 1
for cnt, segment in enumerate(path_segments):
if not segment:
@@ -325,14 +366,15 @@ def files_breadcrumbs(repo_name, repo_type, commit_id, file_path, landing_ref_na
repo_files_by_ref_url(
repo_name,
repo_type,
- f_path='/'.join(path_segments[:cnt + 1]),
+ f_path="/".join(path_segments[: cnt + 1]),
ref_name=default_landing_ref,
commit_id=commit_id,
- query=route_qry
+ query=route_qry,
),
- ))
+ )
+ )
- limited_url_segments = url_segments[:1] + ['...'] + url_segments[-5:]
+ limited_url_segments = url_segments[:1] + ["..."] + url_segments[-5:]
if limit_items and len(limited_url_segments) < len(url_segments):
url_segments = limited_url_segments
@@ -340,28 +382,35 @@ def files_breadcrumbs(repo_name, repo_type, commit_id, file_path, landing_ref_na
if copy_path_icon:
icon = files_icon.format(escape(full_path))
else:
- icon = ''
+ icon = ""
- if file_path == '':
+ if file_path == "":
return root_name
else:
- return literal(' / '.join(url_segments) + icon)
+ return literal(" / ".join(url_segments) + icon)
def files_url_data(request):
matchdict = request.matchdict
- if 'f_path' not in matchdict:
- matchdict['f_path'] = ''
+ if "f_path" not in matchdict:
+ matchdict["f_path"] = ""
else:
- matchdict['f_path'] = urllib.parse.quote(safe_str(matchdict['f_path']))
- if 'commit_id' not in matchdict:
- matchdict['commit_id'] = 'tip'
+ matchdict["f_path"] = urllib.parse.quote(safe_str(matchdict["f_path"]))
+ if "commit_id" not in matchdict:
+ matchdict["commit_id"] = "tip"
return ext_json.str_json(matchdict)
-def repo_files_by_ref_url(db_repo_name, db_repo_type, f_path, ref_name, commit_id, query=None, ):
+def repo_files_by_ref_url(
+ db_repo_name,
+ db_repo_type,
+ f_path,
+ ref_name,
+ commit_id,
+ query=None,
+):
_is_svn = is_svn(db_repo_type)
final_f_path = f_path
@@ -374,13 +423,13 @@ def repo_files_by_ref_url(db_repo_name, db_repo_type, f_path, ref_name, commit_i
like: /1000/tags/1.0.0/?at=tags/1.0.0
"""
- if ref_name and ref_name != 'tip':
+ if ref_name and ref_name != "tip":
# NOTE(marcink): for svn the ref_name is actually the stored path, so we prefix it
# for SVN we only do this magic prefix if it's root, .eg landing revision
# of files link. If we are in the tree we don't need this since we traverse the url
# that has everything stored
- if f_path in ['', '/']:
- final_f_path = '/'.join([ref_name, f_path])
+ if f_path in ["", "/"]:
+ final_f_path = "/".join([ref_name, f_path])
# SVN always needs a commit_id explicitly, without a named REF
default_commit_id = commit_id
@@ -390,21 +439,17 @@ def repo_files_by_ref_url(db_repo_name, db_repo_type, f_path, ref_name, commit_i
like: /master/some_path?at=master
"""
# We currently do not support branches with slashes
- if '/' in ref_name:
+ if "/" in ref_name:
default_commit_id = commit_id
else:
default_commit_id = ref_name
# sometimes we pass f_path as None, to indicate explicit no prefix,
# we translate it to string to not have None
- final_f_path = final_f_path or ''
+ final_f_path = final_f_path or ""
files_url = route_path(
- 'repo_files',
- repo_name=db_repo_name,
- commit_id=default_commit_id,
- f_path=final_f_path,
- _query=query
+ "repo_files", repo_name=db_repo_name, commit_id=default_commit_id, f_path=final_f_path, _query=query
)
return files_url
@@ -420,6 +465,7 @@ def code_highlight(code, lexer, formatter, use_hl_filter=False):
if use_hl_filter:
# add HL filter
from rhodecode.lib.index import search_utils
+
lexer.add_filter(search_utils.ElasticSearchHLFilter())
return pygments.format(pygments.lex(code, lexer), formatter)
@@ -460,18 +506,17 @@ class CodeHtmlFormatter(HtmlFormatter):
if i % st == 0:
if i % sp == 0:
if aln:
- lines.append('%*d' %
- (la, i, mw, i))
+ lines.append('%*d' % (la, i, mw, i))
else:
lines.append('%*d' % (mw, i))
else:
if aln:
lines.append('%*d' % (la, i, mw, i))
else:
- lines.append('%*d' % (mw, i))
+ lines.append("%*d" % (mw, i))
else:
- lines.append('')
- ls = '\n'.join(lines)
+ lines.append("")
+ ls = "\n".join(lines)
else:
lines = []
for i in range(fl, fl + lncount):
@@ -479,43 +524,52 @@ class CodeHtmlFormatter(HtmlFormatter):
if aln:
lines.append('%*d' % (la, i, mw, i))
else:
- lines.append('%*d' % (mw, i))
+ lines.append("%*d" % (mw, i))
else:
- lines.append('')
- ls = '\n'.join(lines)
+ lines.append("")
+ ls = "\n".join(lines)
# in case you wonder about the seemingly redundant
here: since the
# content in the other cell also is wrapped in a div, some browsers in
# some configurations seem to mess up the formatting...
if nocls:
- yield 0, ('
"
class SearchContentCodeHtmlFormatter(CodeHtmlFormatter):
def __init__(self, **kw):
# only show these line numbers if set
- self.only_lines = kw.pop('only_line_numbers', [])
- self.query_terms = kw.pop('query_terms', [])
- self.max_lines = kw.pop('max_lines', 5)
- self.line_context = kw.pop('line_context', 3)
- self.url = kw.pop('url', None)
+ self.only_lines = kw.pop("only_line_numbers", [])
+ self.query_terms = kw.pop("query_terms", [])
+ self.max_lines = kw.pop("max_lines", 5)
+ self.line_context = kw.pop("line_context", 3)
+ self.url = kw.pop("url", None)
super(CodeHtmlFormatter, self).__init__(**kw)
def _wrap_code(self, source):
for cnt, it in enumerate(source):
i, t = it
- t = '
%s
' % t
+ t = "
%s
" % t
yield i, t
def _wrap_tablelinenos(self, inner):
@@ -531,30 +585,32 @@ class SearchContentCodeHtmlFormatter(CodeHtmlFormatter):
if current_line_number in self.only_lines:
if last_shown_line_number + 1 != current_line_number:
- yield 0, '
')
# None means just show the file-source
@@ -1882,51 +2151,61 @@ def get_permission_name(key):
def journal_filter_help(request):
_ = request.translate
from rhodecode.lib.audit_logger import ACTIONS
- actions = '\n'.join(textwrap.wrap(', '.join(sorted(ACTIONS.keys())), 80))
+
+ actions = "\n".join(textwrap.wrap(", ".join(sorted(ACTIONS.keys())), 80))
return _(
- 'Example filter terms:\n' +
- ' repository:vcs\n' +
- ' username:marcin\n' +
- ' username:(NOT marcin)\n' +
- ' action:*push*\n' +
- ' ip:127.0.0.1\n' +
- ' date:20120101\n' +
- ' date:[20120101100000 TO 20120102]\n' +
- '\n' +
- 'Actions: {actions}\n' +
- '\n' +
- 'Generate wildcards using \'*\' character:\n' +
- ' "repository:vcs*" - search everything starting with \'vcs\'\n' +
- ' "repository:*vcs*" - search for repository containing \'vcs\'\n' +
- '\n' +
- 'Optional AND / OR operators in queries\n' +
- ' "repository:vcs OR repository:test"\n' +
- ' "username:test AND repository:test*"\n'
+ "Example filter terms:\n"
+ + " repository:vcs\n"
+ + " username:marcin\n"
+ + " username:(NOT marcin)\n"
+ + " action:*push*\n"
+ + " ip:127.0.0.1\n"
+ + " date:20120101\n"
+ + " date:[20120101100000 TO 20120102]\n"
+ + "\n"
+ + "Actions: {actions}\n"
+ + "\n"
+ + "Generate wildcards using '*' character:\n"
+ + " \"repository:vcs*\" - search everything starting with 'vcs'\n"
+ + " \"repository:*vcs*\" - search for repository containing 'vcs'\n"
+ + "\n"
+ + "Optional AND / OR operators in queries\n"
+ + ' "repository:vcs OR repository:test"\n'
+ + ' "username:test AND repository:test*"\n'
).format(actions=actions)
def not_mapped_error(repo_name):
from rhodecode.translation import _
- flash(_('%s repository is not mapped to db perhaps'
- ' it was created or renamed from the filesystem'
- ' please run the application again'
- ' in order to rescan repositories') % repo_name, category='error')
+
+ flash(
+ _(
+ "%s repository is not mapped to db perhaps"
+ " it was created or renamed from the filesystem"
+ " please run the application again"
+ " in order to rescan repositories"
+ )
+ % repo_name,
+ category="error",
+ )
def ip_range(ip_addr):
from rhodecode.model.db import UserIpMap
+
s, e = UserIpMap._get_ip_range(ip_addr)
- return '%s - %s' % (s, e)
+ return "%s - %s" % (s, e)
-def form(url, method='post', needs_csrf_token=True, **attrs):
+def form(url, method="post", needs_csrf_token=True, **attrs):
"""Wrapper around webhelpers.tags.form to prevent CSRF attacks."""
- if method.lower() != 'get' and needs_csrf_token:
+ if method.lower() != "get" and needs_csrf_token:
raise Exception(
- 'Forms to POST/PUT/DELETE endpoints should have (in general) a ' +
- 'CSRF token. If the endpoint does not require such token you can ' +
- 'explicitly set the parameter needs_csrf_token to false.')
+ "Forms to POST/PUT/DELETE endpoints should have (in general) a "
+ + "CSRF token. If the endpoint does not require such token you can "
+ + "explicitly set the parameter needs_csrf_token to false."
+ )
return insecure_form(url, method=method, **attrs)
@@ -1951,17 +2230,14 @@ def secure_form(form_url, method="POST", multipart=False, **attrs):
"""
- if 'request' in attrs:
- session = attrs['request'].session
- del attrs['request']
+ if "request" in attrs:
+ session = attrs["request"].session
+ del attrs["request"]
else:
- raise ValueError(
- 'Calling this form requires request= to be passed as argument')
+ raise ValueError("Calling this form requires request= to be passed as argument")
_form = insecure_form(form_url, method, multipart, **attrs)
- token = literal(
- ''.format(
- csrf_token_key, get_csrf_token(session)))
+ token = literal(''.format(csrf_token_key, get_csrf_token(session)))
return literal("%s\n%s" % (_form, token))
@@ -1984,12 +2260,12 @@ def dropdownmenu(name, selected, options, enable_filter=False, **attrs):
filter_option = """,
minimumResultsForSearch: -1
"""
- input_id = attrs.get('id') or name
- extra_classes = ' '.join(attrs.pop('extra_classes', []))
+ input_id = attrs.get("id") or name
+ extra_classes = " ".join(attrs.pop("extra_classes", []))
filter_enabled = "" if enable_filter else filter_option
select_script = literal(select2 % (input_id, extra_classes, filter_enabled))
- return literal(select_html+select_script)
+ return literal(select_html + select_script)
def get_visual_attr(tmpl_context_var, attr_name):
@@ -1999,7 +2275,7 @@ def get_visual_attr(tmpl_context_var, attr_name):
:param tmpl_context_var: instance of tmpl_context, usually present as `c`
:param attr_name: name of the attribute we fetch from the c.visual
"""
- visual = getattr(tmpl_context_var, 'visual', None)
+ visual = getattr(tmpl_context_var, "visual", None)
if not visual:
return
else:
@@ -2008,10 +2284,10 @@ def get_visual_attr(tmpl_context_var, attr_name):
def get_last_path_part(file_node):
if not file_node.path:
- return '/'
+ return "/"
- path = safe_str(file_node.path.split('/')[-1])
- return '../' + path
+ path = safe_str(file_node.path.split("/")[-1])
+ return "../" + path
def route_url(*args, **kwargs):
@@ -2044,16 +2320,10 @@ def current_route_path(request, **kw):
def curl_api_example(method, args):
- args_json = json.dumps(OrderedDict([
- ('id', 1),
- ('auth_token', 'SECRET'),
- ('method', method),
- ('args', args)
- ]))
+ args_json = json.dumps(OrderedDict([("id", 1), ("auth_token", "SECRET"), ("method", method), ("args", args)]))
return "curl {api_url} -X POST -H 'content-type:text/plain' --data-binary '{args_json}'".format(
- api_url=route_url('apiv2'),
- args_json=args_json
+ api_url=route_url("apiv2"), args_json=args_json
)
@@ -2064,10 +2334,10 @@ def api_call_example(method, args):
curl_call = curl_api_example(method, args)
return literal(
- curl_call +
- "
SECRET can be found in auth-tokens page, "
- "and needs to be of `api calls` role."
- .format(token_url=route_url('my_account_auth_tokens')))
+ curl_call
+ + '
SECRET can be found in auth-tokens page, '
+ "and needs to be of `api calls` role.".format(token_url=route_url("my_account_auth_tokens"))
+ )
def notification_description(notification, request):
@@ -2075,8 +2345,8 @@ def notification_description(notification, request):
Generate notification human readable description based on notification type
"""
from rhodecode.model.notification import NotificationModel
- return NotificationModel().make_description(
- notification, translate=request.translate)
+
+ return NotificationModel().make_description(notification, translate=request.translate)
def go_import_header(request, db_repo=None):
@@ -2086,29 +2356,29 @@ def go_import_header(request, db_repo=None):
if not db_repo:
return
- if 'go-get' not in request.GET:
+ if "go-get" not in request.GET:
return
clone_url = db_repo.clone_url()
- prefix = re.split(r'^https?:\/\/', clone_url)[-1]
+ prefix = re.split(r"^https?:\/\/", clone_url)[-1]
# we have a repo and go-get flag,
- return literal(''.format(
- prefix, db_repo.repo_type, clone_url))
+ return literal(''.format(prefix, db_repo.repo_type, clone_url))
def reviewer_as_json(*args, **kwargs):
from rhodecode.apps.repository.utils import reviewer_as_json as _reviewer_as_json
+
return _reviewer_as_json(*args, **kwargs)
def get_repo_view_type(request):
route_name = request.matched_route.name
route_to_view_type = {
- 'repo_changelog': 'commits',
- 'repo_commits': 'commits',
- 'repo_files': 'files',
- 'repo_summary': 'summary',
- 'repo_commit': 'commit'
+ "repo_changelog": "commits",
+ "repo_commits": "commits",
+ "repo_files": "files",
+ "repo_summary": "summary",
+ "repo_commit": "commit",
}
return route_to_view_type.get(route_name)
@@ -2139,9 +2409,10 @@ class IssuesRegistry(object):
def __call__(self, commit_dict=None):
def callback(issue):
if commit_dict and issue:
- issue['commit'] = commit_dict
+ issue["commit"] = commit_dict
self.issues.append(issue)
- self.unique_issues[issue['id']].append(issue)
+ self.unique_issues[issue["id"]].append(issue)
+
return callback
def get_issues(self):
@@ -2149,7 +2420,7 @@ class IssuesRegistry(object):
@property
def issues_unique_count(self):
- return len(set(i['id'] for i in self.issues))
+ return len(set(i["id"] for i in self.issues))
def get_directory_statistics(start_path):
@@ -2177,7 +2448,7 @@ def get_directory_statistics(start_path):
file_size = os.path.getsize(filepath)
dir_size += file_size
- directory_stats[dir_path] = {'file_count': file_count, 'size': dir_size}
+ directory_stats[dir_path] = {"file_count": file_count, "size": dir_size}
total_files += file_count
total_size += dir_size
diff --git a/rhodecode/lib/middleware/utils/scm_app_http.py b/rhodecode/lib/middleware/utils/scm_app_http.py
index f9551ba9..ddf20032 100644
--- a/rhodecode/lib/middleware/utils/scm_app_http.py
+++ b/rhodecode/lib/middleware/utils/scm_app_http.py
@@ -117,12 +117,6 @@ class VcsHttpProxy(object):
log.debug("http-app: preparing %s request to: %s", method, url)
- import ipdb;
- import rich
- from rich import print as pprint, inspect
- pprint("** STARTING DEBUG **")
- ipdb.set_trace()
-
response = session.request(
method, url, data=_maybe_stream_request(environ), headers=request_headers, stream=True
)