Skip to content

Commit c400de5

Browse files
committed
feat: remove the python2 pilot starter
1 parent aa011bd commit c400de5

File tree

15 files changed

+27
-109
lines changed

15 files changed

+27
-109
lines changed

.github/workflows/basic.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,6 @@ jobs:
134134
env:
135135
REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}
136136

137-
pylint-py27:
138-
name: Pylint for Python 2.7 in Pilot files
139-
runs-on: ubuntu-latest
140-
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
141-
steps:
142-
- uses: actions/checkout@v6
143-
- name: Fail-fast for outdated pipelines
144-
run: .github/workflows/fail-fast.sh
145-
- name: prepare environment
146-
run: |
147-
conda config --set add_pip_as_python_dependency false
148-
conda create -c conda-forge -n test-env python=2.7 pylint=1.9.2 astroid=1.6.5
149-
- name: run pilot wrapper test
150-
run: |
151-
eval "$(conda shell.bash hook)" && conda activate test-env
152-
pylint -j 0 -E \
153-
tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py \
154-
src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py \
155-
src/DIRAC/Resources/Computing/BatchSystems/*.py
156-
157137
diracx:
158138
name: DiracX Unit Tests
159139
runs-on: ubuntu-latest

docs/source/AdministratorGuide/Systems/WorkloadManagement/Pilots/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ where:
4040
- configure means adding dirac specific configuration files (which, at a minimum, should include the location of a DIRAC configuration service)
4141

4242

43-
A pilot has to run on each and every computing resource type, provided that Python 2.6+ is on the WN.
43+
A pilot has to run on each and every computing resource type, provided that Python 3.6+ is on the WN.
4444
The same pilot script can be used everywhere.
4545

4646
.. image:: Pilots2.png

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,9 @@ console_scripts =
326326
[pycodestyle]
327327
# Pep8 codes:
328328
# E203 - Whitespace before ':' (spaces should be present for list slices)
329-
# E211 - Whitespace before '(' (black incorrectly formats exec when in Python 2 mode)
330329
# E266 - Too many leading '#' for block comment
331330
# E402 - module level import not at top of file (for scripts)
332331
# W503 - line break before binary operator (stupid, complains after or before...)
333-
ignore = E203, E211, E266, E402, W503
332+
ignore = E203, E266, E402, W503
334333
# TODO: This should be reduced back to 120 at some point
335334
max_line_length=130

src/DIRAC/Core/Utilities/Plotting/FileCoding.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ def extractRequestFromFileId(fileId):
4141
if compressType == "Z":
4242
gLogger.info("Compressed request, uncompressing")
4343
try:
44-
# Encoding is only required for Python 2 and can be removed when Python 2 support is no longer needed
45-
stub = base64.urlsafe_b64decode(stub.encode())
44+
stub = base64.urlsafe_b64decode(stub)
4645
except Exception as e:
4746
gLogger.error("Oops! Plot request is not properly encoded!", str(e))
4847
return S_ERROR(f"Oops! Plot request is not properly encoded!: {str(e)}")

src/DIRAC/Resources/Computing/BatchSystems/Condor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
LocalComputingElement and SSHComputingElement classes
44
"""
55

6-
from __future__ import print_function
7-
from __future__ import absolute_import
8-
from __future__ import division
96
import json
107
import re
118
import tempfile

src/DIRAC/Resources/Computing/BatchSystems/GE.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
SubmitOption = -l ct=6000
1515
"""
1616

17-
from __future__ import print_function
18-
from __future__ import absolute_import
19-
from __future__ import division
2017
import re
2118
import shlex
2219
import subprocess

src/DIRAC/Resources/Computing/BatchSystems/Host.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
with LocalComputingElement or SSHComputingElement objects
99
"""
1010

11-
from __future__ import print_function
12-
from __future__ import absolute_import
13-
from __future__ import division
14-
1511
import os
1612
import glob
1713
import shutil

src/DIRAC/Resources/Computing/BatchSystems/LSF.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
LocalComputingElement and SSHComputingElement classes
1010
"""
1111

12-
from __future__ import print_function
13-
from __future__ import absolute_import
14-
from __future__ import division
1512
import re
1613
import subprocess
1714
import shlex

src/DIRAC/Resources/Computing/BatchSystems/OAR.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
LocalComputingElement and SSHComputingElement classes
1010
"""
1111

12-
from __future__ import print_function
13-
from __future__ import absolute_import
14-
from __future__ import division
15-
1612
import subprocess
1713
import shlex
1814
import os

src/DIRAC/Resources/Computing/BatchSystems/SLURM.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
LocalComputingElement and SSHComputingElement classes
44
"""
55

6-
from __future__ import print_function
7-
from __future__ import absolute_import
8-
from __future__ import division
9-
106
import os
117
import re
128
import subprocess

0 commit comments

Comments
 (0)