Skip to content

Commit 85a8918

Browse files
authored
Merge pull request #6439 from fstagni/81_removeDeprecations
[8.1] remove deprecations
2 parents e0e184e + e2fc46b commit 85a8918

File tree

17 files changed

+2
-388
lines changed

17 files changed

+2
-388
lines changed

Core/scripts/dirac-install.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

dirac.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,6 @@ Operations
10381038
WriteProtocols = srm
10391039
WriteProtocols += dips
10401040
# FTS related options. See http://dirac.readthedocs.io/en/latest/AdministratorGuide/Systems/DataManagement/fts.html
1041-
FTSVersion = FTS3 # should only be that...
10421041
FTSPlacement
10431042
{
10441043
FTS3

docs/source/AdministratorGuide/Configuration/ConfReference/Operations/DataManagement/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Operations / DataManagement
1717
* WriteProtocols (['srm', 'dips']): list of the possible protocols to be used to perform the write and remove operations. Overwritten at the level of a StorageElement configuration.
1818
* AllowUserReplicaManagement (False): if set to True, clients without the FileCatalogManagement property can use the dirac-dms-remove-catalog-* commands to manipulate the file catalog.
1919
* ForceIndexedMetadata (False): if True disables implicit creation of non-indexed Metadata.
20-
* FTSVersion (FTS2): version of FTS to use. Possibilities: FTS3 or FTS2 (deprecated)
2120
* FTSPlacement section:
2221

2322
- FTS3 section:

docs/source/AdministratorGuide/Systems/DataManagement/fts3.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ In order for the transfers to be submitted to the FTS system, the following opti
4242

4343
* ``FTSMode`` must be True
4444
* ``FTSBannedGroups`` should contain the list of groups for which you'd rather do direct transfers.
45-
* ``UseNewFTS3`` should be True in order to use this new FTS system (soon to be deprecated)
4645

4746
========================
4847
Operations configuration
4948
========================
5049

51-
* DataManagement/FTSVersion: FTS2/FTS3. Set it to FTS3...
5250
* DataManagement/FTSPlacement/FTS3/ServerPolicy: Policy to choose the FTS server see `FTSServer policy`_.
5351
* DataManagement/FTSPlacement/FTS3/FTS3Plugin: Plugin to alter the behavior of the FTS3Agent
5452

src/DIRAC/Core/Base/Script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __call__(self, func=None):
6969
"Invalid dirac- console_scripts entry_point: "
7070
+ repr(entrypoint)
7171
+ "\n"
72-
+ "All dirac- console_scripts should be wrapped in the DiracScript "
72+
+ "All dirac- console_scripts should be wrapped in the Script "
7373
+ "decorator to ensure extension overlays are applied correctly."
7474
)
7575
return entrypointFunc._func()

src/DIRAC/Core/Security/m2crypto/X509Chain.py

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from DIRAC import S_OK, S_ERROR
2222
from DIRAC.Core.Utilities import DErrno
23-
from DIRAC.Core.Utilities.Decorators import executeOnlyIf, deprecated
23+
from DIRAC.Core.Utilities.Decorators import executeOnlyIf
2424
from DIRAC.ConfigurationSystem.Client.Helpers import Registry
2525
from DIRAC.Core.Security.m2crypto import PROXY_OID, LIMITED_PROXY_OID, DIRAC_GROUP_OID, DEFAULT_PROXY_STRENGTH
2626
from DIRAC.Core.Security.m2crypto.X509Certificate import X509Certificate
@@ -165,22 +165,6 @@ def __init__(self, certList=False, keyObj=False):
165165
if keyObj:
166166
self._keyObj = keyObj
167167

168-
@classmethod
169-
@deprecated("Use loadChainFromFile instead", onlyOnce=True)
170-
def instanceFromFile(cls, chainLocation):
171-
"""Class method to generate a X509Chain from a file
172-
173-
:param chainLocation: path to the file
174-
175-
:returns: S_OK(X509Chain)
176-
"""
177-
chain = cls()
178-
result = chain.loadChainFromFile(chainLocation)
179-
if not result["OK"]:
180-
return result
181-
182-
return S_OK(chain)
183-
184168
@staticmethod
185169
def generateX509ChainFromSSLConnection(sslConnection):
186170
"""Returns an instance of X509Chain from the SSL connection
@@ -393,24 +377,6 @@ def getIssuerCert(self):
393377
return S_OK(self._certList[self.__firstProxyStep + 1])
394378
return S_OK(self._certList[-1])
395379

396-
@deprecated("Only here for compatibility reason", onlyOnce=True)
397-
@needPKey
398-
def getPKeyObj(self):
399-
"""
400-
Get the pkey obj
401-
402-
:returns: ~M2Crypto.EVP.PKey object
403-
"""
404-
return S_OK(self._keyObj)
405-
406-
@deprecated("Only here for compatibility reason")
407-
@needCertList
408-
def getCertList(self):
409-
"""
410-
Get the cert list
411-
"""
412-
return S_OK(self._certList)
413-
414380
@needCertList
415381
def getNumCertsInChain(self):
416382
"""

src/DIRAC/Core/Security/test/Test_X509Chain.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -155,33 +155,13 @@ def test_loadChainFromString_non_pem(get_X509Chain_class):
155155
assert res["Errno"] == EX509
156156

157157

158-
@parametrize("key_file", CERTKEYS)
159-
def test_init_with_key(key_file, get_X509Chain_class):
160-
"""Test init with key object as argument and check the content"""
161-
162-
chain1 = get_X509Chain_class()
163-
chain1.loadKeyFromFile(key_file)
164-
165-
# Get the key and check the number of bits
166-
keyObj = chain1.getPKeyObj()["Value"]
167-
168-
chain2 = get_X509Chain_class(keyObj=keyObj)
169-
assert chain1.dumpPKeyToString() == chain2.dumpPKeyToString()
170-
# Careful ! The two keys are the same object
171-
assert chain2.getPKeyObj()["Value"] is keyObj
172-
173-
174158
@parametrize("key_file", CERTKEYS)
175159
def test_privatekey_without_password(key_file, get_X509Chain_class):
176160
"""Test loading a key from a file, retrieve the object and check the content"""
177161

178162
X509Chain = get_X509Chain_class()
179163
res = X509Chain.loadKeyFromFile(key_file)
180164
assert res["OK"]
181-
# Get the key and check the number of bits
182-
res = X509Chain.getPKeyObj()
183-
assert res["OK"]
184-
assert res["Value"].size() == 512
185165

186166
# Check that the content of the object is correct.
187167
# CAUTION ! The object is PKCS8, while the file contains PKCS1.
@@ -195,10 +175,6 @@ def test_privatekey_with_password(get_X509Chain_class):
195175
X509Chain = get_X509Chain_class()
196176
res = X509Chain.loadKeyFromFile(ENCRYPTEDKEY, password=ENCRYPTEDKEYPASS)
197177
assert res["OK"]
198-
# Get the key and check the number of bits
199-
res = X509Chain.getPKeyObj()
200-
assert res["OK"]
201-
assert res["Value"].size() == 512
202178

203179

204180
def test_privatekey_with_wrong_password(get_X509Chain_class):
@@ -233,17 +209,6 @@ def test_getCertInChain_too_far(get_X509Chain_class):
233209
x509Chain.getCertInChain(1)
234210

235211

236-
@parametrize("cert_file", CERTS)
237-
def test_getCertList(cert_file, get_X509Chain_class):
238-
""" " Load a chain, and get its length."""
239-
x509Chain = get_X509Chain_class()
240-
x509Chain.loadChainFromFile(cert_file)
241-
# For a certificate, there should be only 1 certificate in the chain
242-
243-
assert len(x509Chain.getCertList()["Value"]) == 1
244-
assert len(x509Chain.getCertList()["Value"]) == x509Chain.getNumCertsInChain()["Value"]
245-
246-
247212
@parametrize("cert_file", CERTS)
248213
def test_certProperties(cert_file, get_X509Chain_class):
249214
"""Try on a certificate if it is a proxy, limited proxy, VOMS, valid proxy, rfc"""

src/DIRAC/Core/Utilities/DIRACScript.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/DIRAC/Core/Utilities/Os.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
by default on Error they return None
44
"""
55
import os
6-
import shutil
76

87
import DIRAC
9-
from DIRAC.Core.Utilities.Decorators import deprecated
108
from DIRAC.Core.Utilities.Subprocess import shellCall, systemCall
119
from DIRAC.Core.Utilities import List
1210

@@ -145,8 +143,3 @@ def sourceEnv(timeout, cmdTuple, inputEnv=None):
145143
result["stderr"] = stderr
146144

147145
return result
148-
149-
150-
@deprecated("Will be removed in DIRAC 8.1", onlyOnce=True)
151-
def which(executable):
152-
return shutil.which(executable)

src/DIRAC/Core/Utilities/test/Test_gCFG.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)