From 92fe8c512dca4b9d6c15c7bf70cb0bd97334223c Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Mon, 6 Mar 2023 23:36:17 +0100 Subject: [PATCH] python3: removed compat modules --- rhodecode/apps/ops/views.py | 2 +- rhodecode/apps/repository/tests/test_repo_files.py | 2 +- rhodecode/apps/repository/tests/test_repo_summary.py | 2 +- rhodecode/apps/repository/views/repo_commits.py | 2 +- rhodecode/lib/pidlock.py | 3 +-- rhodecode/lib/vcs/backends/git/repository.py | 2 +- rhodecode/lib/vcs/backends/hg/repository.py | 2 +- rhodecode/lib/vcs/backends/svn/repository.py | 2 +- rhodecode/model/pull_request.py | 2 +- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/rhodecode/apps/ops/views.py b/rhodecode/apps/ops/views.py index 7f7b7df0..84cbc5fd 100644 --- a/rhodecode/apps/ops/views.py +++ b/rhodecode/apps/ops/views.py @@ -27,7 +27,7 @@ from pyramid.httpexceptions import HTTPFound from rhodecode.apps._base import BaseAppView from rhodecode.lib import helpers as h from rhodecode.lib.auth import LoginRequired -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.model.db import UserApiKeys log = logging.getLogger(__name__) diff --git a/rhodecode/apps/repository/tests/test_repo_files.py b/rhodecode/apps/repository/tests/test_repo_files.py index 887e1cb9..45b8fff6 100644 --- a/rhodecode/apps/repository/tests/test_repo_files.py +++ b/rhodecode/apps/repository/tests/test_repo_files.py @@ -26,7 +26,7 @@ import pytest from rhodecode.apps.repository.tests.test_repo_compare import ComparePage from rhodecode.apps.repository.views.repo_files import RepoFilesView from rhodecode.lib import helpers as h -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.ext_json import json from rhodecode.lib.vcs import nodes diff --git a/rhodecode/apps/repository/tests/test_repo_summary.py b/rhodecode/apps/repository/tests/test_repo_summary.py index 16da54c3..6dcc4f36 100644 --- a/rhodecode/apps/repository/tests/test_repo_summary.py +++ b/rhodecode/apps/repository/tests/test_repo_summary.py @@ -25,7 +25,7 @@ import pytest from rhodecode.apps.repository.views.repo_summary import RepoSummaryView from rhodecode.lib import helpers as h -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.utils2 import AttributeDict, safe_str from rhodecode.lib.vcs.exceptions import RepositoryRequirementError from rhodecode.model.db import Repository diff --git a/rhodecode/apps/repository/views/repo_commits.py b/rhodecode/apps/repository/views/repo_commits.py index 9940cbec..c0f286c4 100644 --- a/rhodecode/apps/repository/views/repo_commits.py +++ b/rhodecode/apps/repository/views/repo_commits.py @@ -34,7 +34,7 @@ from rhodecode.lib import diffs, codeblocks, channelstream from rhodecode.lib.auth import ( LoginRequired, HasRepoPermissionAnyDecorator, NotAnonymous, CSRFRequired) from rhodecode.lib.ext_json import json -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.diffs import ( cache_diff, load_cached_diff, diff_cache_exist, get_diff_context, get_diff_whitespace_flag) diff --git a/rhodecode/lib/pidlock.py b/rhodecode/lib/pidlock.py index d8649a46..36c4ea62 100644 --- a/rhodecode/lib/pidlock.py +++ b/rhodecode/lib/pidlock.py @@ -23,7 +23,6 @@ import errno from multiprocessing.util import Finalize -from rhodecode.lib.compat import kill class LockHeld(Exception): @@ -92,7 +91,7 @@ class DaemonLock(object): # process PID if running_pid: try: - kill(running_pid, 0) + os.kill(running_pid, 0) except OSError as exc: if exc.errno in (errno.ESRCH, errno.EPERM): print("Lock File is there but" diff --git a/rhodecode/lib/vcs/backends/git/repository.py b/rhodecode/lib/vcs/backends/git/repository.py index 439d1a3e..8514f18a 100644 --- a/rhodecode/lib/vcs/backends/git/repository.py +++ b/rhodecode/lib/vcs/backends/git/repository.py @@ -28,7 +28,7 @@ import re from zope.cachedescriptors.property import Lazy as LazyProperty -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.datelib import ( utcdate_fromtimestamp, makedate, date_astimestamp) from rhodecode.lib.utils import safe_unicode, safe_str diff --git a/rhodecode/lib/vcs/backends/hg/repository.py b/rhodecode/lib/vcs/backends/hg/repository.py index 32d918f8..006c41cb 100644 --- a/rhodecode/lib/vcs/backends/hg/repository.py +++ b/rhodecode/lib/vcs/backends/hg/repository.py @@ -29,7 +29,7 @@ import urllib.request, urllib.parse, urllib.error from zope.cachedescriptors.property import Lazy as LazyProperty -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.datelib import ( date_to_timestamp_plus_offset, utcdate_fromtimestamp, makedate) from rhodecode.lib.utils import safe_unicode, safe_str diff --git a/rhodecode/lib/vcs/backends/svn/repository.py b/rhodecode/lib/vcs/backends/svn/repository.py index be863869..5b2a663d 100644 --- a/rhodecode/lib/vcs/backends/svn/repository.py +++ b/rhodecode/lib/vcs/backends/svn/repository.py @@ -28,7 +28,7 @@ import urllib.request, urllib.parse, urllib.error from zope.cachedescriptors.property import Lazy as LazyProperty -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.datelib import date_astimestamp from rhodecode.lib.utils import safe_str, safe_unicode from rhodecode.lib.utils2 import CachedProperty diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py index 42178bb1..fddb44d6 100644 --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -38,7 +38,7 @@ from rhodecode.lib.vcs.nodes import FileNode from rhodecode.translation import lazy_ugettext from rhodecode.lib import helpers as h, hooks_utils, diffs from rhodecode.lib import audit_logger -from rhodecode.lib.compat import OrderedDict +from collections import OrderedDict from rhodecode.lib.hooks_daemon import prepare_callback_daemon from rhodecode.lib.markup_renderer import ( DEFAULT_COMMENTS_RENDERER, RstTemplateRenderer)