Skip to content

Commit d4bfc37

Browse files
committed
feat: remove the python2 pilot starter
1 parent af37100 commit d4bfc37

File tree

17 files changed

+28
-111
lines changed

17 files changed

+28
-111
lines changed

.github/workflows/basic.yml

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

94-
pylint-py27:
95-
name: Pylint for Python 2.7 in Pilot files
96-
runs-on: ubuntu-latest
97-
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
98-
steps:
99-
- uses: actions/checkout@v4
100-
- name: Fail-fast for outdated pipelines
101-
run: .github/workflows/fail-fast.sh
102-
- name: prepare environment
103-
run: |
104-
conda config --set add_pip_as_python_dependency false
105-
conda create -c conda-forge -n test-env python=2.7 pylint=1.9.2 astroid=1.6.5
106-
- name: run pilot wrapper test
107-
run: |
108-
eval "$(conda shell.bash hook)" && conda activate test-env
109-
pylint -j 0 -E \
110-
tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py \
111-
src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py \
112-
src/DIRAC/Resources/Computing/BatchSystems/*.py
113-
11494
diracx:
11595
name: DiracX Unit Tests
11696
runs-on: ubuntu-latest

.github/workflows/pilotWrapper.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
1111
fail-fast: False
1212
matrix:
1313
python:
14-
- 2.7.5
15-
- 2.7.13
1614
- 3.6.8
1715
- 3.11.4
1816
pilot_branch:

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

docs/source/UserGuide/GettingStarted/InstallingClient/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Installing DIRAC client
1111
The DIRAC client installation procedure consists of few steps.
1212
You can do these steps as any user without the need to be root.
1313

14-
Python3 DIRAC installations rely on the environment provided by `DIRACOS2 <https://github.com/DIRACGrid/DIRACOS2>`_.
14+
DIRAC installations rely on the environment provided by `DIRACOS2 <https://github.com/DIRACGrid/DIRACOS2>`_.
1515
So, you first install DIRACOS2 and only then install DIRAC in it::
1616

1717
$ curl -LO https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-$(uname -m).sh

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,9 @@ console_scripts =
321321
[pycodestyle]
322322
# Pep8 codes:
323323
# E203 - Whitespace before ':' (spaces should be present for list slices)
324-
# E211 - Whitespace before '(' (black incorrectly formats exec when in Python 2 mode)
325324
# E266 - Too many leading '#' for block comment
326325
# E402 - module level import not at top of file (for scripts)
327326
# W503 - line break before binary operator (stupid, complains after or before...)
328-
ignore = E203, E211, E266, E402, W503
327+
ignore = E203, E266, E402, W503
329328
# TODO: This should be reduced back to 120 at some point
330329
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

0 commit comments

Comments
 (0)