mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 12:32:13 +02:00
bitbake: compat.py: remove file since it no longer actually implements anything
Now that compat.py just imports Python standard library stuff, get rid of the layer of indirection. (Bitbake rev: 2a40a776efd7c28fa93a8556accccb79e3a7d0f0) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e2be6defbb9fcf25f9df04c3b452d0dba48dfd03) Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d2f1a20a19
commit
c35f34361e
@@ -1,10 +0,0 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
|
||||
"""Code pulled from future python versions, here for compatibility"""
|
||||
|
||||
from collections import MutableMapping, KeysView, ValuesView, ItemsView, OrderedDict
|
||||
from functools import total_ordering
|
||||
|
||||
|
||||
@@ -10,17 +10,17 @@ BitBake build tools.
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
|
||||
import sys
|
||||
import pickle
|
||||
import logging
|
||||
import atexit
|
||||
import traceback
|
||||
import ast
|
||||
import atexit
|
||||
import collections
|
||||
import logging
|
||||
import pickle
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
import bb.utils
|
||||
import bb.compat
|
||||
import bb.exceptions
|
||||
import bb.utils
|
||||
|
||||
# This is the pid for which we should generate the event. This is set when
|
||||
# the runqueue forks off.
|
||||
@@ -56,7 +56,7 @@ def set_class_handlers(h):
|
||||
_handlers = h
|
||||
|
||||
def clean_class_handlers():
|
||||
return bb.compat.OrderedDict()
|
||||
return collections.OrderedDict()
|
||||
|
||||
# Internal
|
||||
_handlers = clean_class_handlers()
|
||||
|
||||
@@ -12,14 +12,14 @@ currently, providing a key/value store accessed by 'domain'.
|
||||
#
|
||||
|
||||
import collections
|
||||
import contextlib
|
||||
import functools
|
||||
import logging
|
||||
import os.path
|
||||
import sqlite3
|
||||
import sys
|
||||
import warnings
|
||||
from bb.compat import total_ordering
|
||||
from collections import Mapping
|
||||
import sqlite3
|
||||
import contextlib
|
||||
|
||||
sqlversion = sqlite3.sqlite_version_info
|
||||
if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
|
||||
@@ -28,7 +28,7 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
|
||||
|
||||
logger = logging.getLogger("BitBake.PersistData")
|
||||
|
||||
@total_ordering
|
||||
@functools.total_ordering
|
||||
class SQLTable(collections.MutableMapping):
|
||||
class _Decorators(object):
|
||||
@staticmethod
|
||||
|
||||
@@ -6,17 +6,18 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
|
||||
import unittest
|
||||
import bb
|
||||
import logging
|
||||
import bb.compat
|
||||
import bb.event
|
||||
import collections
|
||||
import importlib
|
||||
import logging
|
||||
import pickle
|
||||
import threading
|
||||
import time
|
||||
import pickle
|
||||
import unittest
|
||||
from unittest.mock import Mock
|
||||
from unittest.mock import call
|
||||
|
||||
import bb
|
||||
import bb.event
|
||||
from bb.msg import BBLogFormatter
|
||||
|
||||
|
||||
@@ -75,7 +76,7 @@ class EventHandlingTest(unittest.TestCase):
|
||||
|
||||
def _create_test_handlers(self):
|
||||
""" Method used to create a test handler ordered dictionary """
|
||||
test_handlers = bb.compat.OrderedDict()
|
||||
test_handlers = collections.OrderedDict()
|
||||
test_handlers["handler1"] = self._test_process.handler1
|
||||
test_handlers["handler2"] = self._test_process.handler2
|
||||
return test_handlers
|
||||
@@ -96,7 +97,7 @@ class EventHandlingTest(unittest.TestCase):
|
||||
|
||||
def test_clean_class_handlers(self):
|
||||
""" Test clean_class_handlers method """
|
||||
cleanDict = bb.compat.OrderedDict()
|
||||
cleanDict = collections.OrderedDict()
|
||||
self.assertEqual(cleanDict,
|
||||
bb.event.clean_class_handlers())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user