Drop import fallback for Python 2

cPickle no longer exists in Python 3 and pickle should be used always.

Change-Id: I5ddedb3e996d9a0679bab38ea94263886274ece4
This commit is contained in:
Takashi Kajinami
2025-02-09 08:04:36 +09:00
parent 961bbb9460
commit 6b81b34b27

View File

@@ -16,23 +16,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo_serialization import jsonutils
import pickle
from apscheduler.jobstores.base import ConflictingIdError
from apscheduler.jobstores import sqlalchemy
from apscheduler.util import datetime_to_utc_timestamp
from apscheduler.util import maybe_ref
from apscheduler.util import utc_timestamp_to_datetime
from oslo_serialization import jsonutils
from watcher.common import context
from watcher.common import service
from watcher import objects
try:
import cPickle as pickle
except ImportError: # pragma: nocover
import pickle
from sqlalchemy import Table, MetaData, select, and_, null
from sqlalchemy.exc import IntegrityError