Skip to content

Commit

Permalink
Remove cPickle support
Browse files Browse the repository at this point in the history
  • Loading branch information
goughes committed Apr 15, 2022
1 parent d1a4ba2 commit 1e1be8c
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 56 deletions.
7 changes: 1 addition & 6 deletions src/python/WMComponent/JobCreator/JobCreatorPoller.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
import os
import os.path
import threading


try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from Utils.Timers import timeFunction
from Utils.PythonVersion import HIGHEST_PICKLE_PROTOCOL
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMComponent/JobSubmitter/JobSubmitterPoller.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
import json
import time
from collections import defaultdict, Counter
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from Utils.Timers import timeFunction
from WMCore.DAOFactory import DAOFactory
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/Agent/Flow/DefaultFlow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@


import os
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from WMCore.Agent.Configuration import Configuration
config = Configuration()
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/Agent/Flow/Generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

import os
import sys
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from WMCore.Agent.Configuration import loadConfigurationFile

Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/BossAir/Plugins/MockPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from datetime import timedelta
from random import randint
import multiprocessing
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

def processWorker(myinput, tmp):
try:
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/DataStructs/JobPackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
Data structure for storing and retreiving multiple job objects.
"""
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle
from Utils.PythonVersion import HIGHEST_PICKLE_PROTOCOL
from WMCore.DataStructs.WMObject import WMObject

Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/FwkJobReport/Report.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
from WMCore.WMException import WMException
from WMCore.WMExceptions import WM_JOB_ERROR_CODES

try:
import cPickle as pickle
except ImportError:
import pickle
import pickle


class FwkJobReportException(WMException):
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/ProcessPool/ProcessPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import os
import threading
import traceback
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from Utils.PythonVersion import PY3

Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/ThreadPool/ThreadPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
import threading
import time
from Utils.Utilities import encodeUnicodeToBytes
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from WMCore.ThreadPool.WorkQueue import ThreadPool as Queue
from WMCore.WMFactory import WMFactory
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/ThreadPool/ThreadSlave.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
import logging
import threading
import os
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from WMCore.Database.Transaction import Transaction
from WMCore.WMFactory import WMFactory
Expand Down
1 change: 0 additions & 1 deletion src/python/WMCore/WMSpec/Makers/Handlers/MakeJobSlave.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from WMCore.WMSpec.Makers.Interface.CreateWorkArea import CreateWorkArea


#import cPickle
import os
import string
import logging
Expand Down
5 changes: 1 addition & 4 deletions src/python/WMCore/WMSpec/Persistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

from builtins import object

try:
import cPickle as pickle
except ImportError:
import pickle
import pickle


class PersistencyHelper(object):
Expand Down
6 changes: 1 addition & 5 deletions test/python/WMCore_t/BossAir_t/BossAir_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
import subprocess
import threading
import unittest

try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

from nose.plugins.attrib import attr

Expand Down
5 changes: 1 addition & 4 deletions test/python/WMCore_t/Misc_t/WMAgent_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
import threading

from subprocess import Popen, PIPE
try:
import cPickle as pickle
except ImportError:
import pickle
import pickle

# Imports for testing
from WMQuality.TestInit import TestInit
Expand Down

0 comments on commit 1e1be8c

Please sign in to comment.