Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure all scripts can run without python2 #2036

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DMWM/AggregatePylint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

import json

Expand Down
2 changes: 1 addition & 1 deletion DMWM/AnalyzePy27.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion DMWM/AnalyzePyFuture.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import print_function, division

Expand Down
2 changes: 1 addition & 1 deletion DMWM/AnalyzePylint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion DMWM/CompareTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion DMWM/IdentifyPythonFiles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import print_function, division

Expand Down
2 changes: 1 addition & 1 deletion DMWM/IssueMessage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

import os

Expand Down
2 changes: 1 addition & 1 deletion DMWM/TestWatchdog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import (print_function, division)

Expand Down
2 changes: 1 addition & 1 deletion RelValArgs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import re
from os import environ, uname
Expand Down
2 changes: 1 addition & 1 deletion add-externals-gh-labels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github
from os.path import expanduser, dirname, abspath, join, exists
Expand Down
2 changes: 1 addition & 1 deletion backport-pr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github, GithubException
from sys import exit
Expand Down
2 changes: 1 addition & 1 deletion build-node-stats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
sys.exit(0) # TODO script not run anymore?
Expand Down
2 changes: 1 addition & 1 deletion cache-pull-request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github
from os.path import expanduser, exists
Expand Down
2 changes: 1 addition & 1 deletion checkDirSizes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function

import sys
Expand Down
2 changes: 1 addition & 1 deletion checkLibDeps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# TODO is this file used?
from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion checkLogFile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion checkPyConfigs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# TODO had syntax errors, is this file used ?
from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion checkTestLog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion chk-invalid-headers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import gzip
import re
from json import dump
Expand Down
2 changes: 1 addition & 1 deletion cms-filename-checks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from sys import argv
from os.path import join, exists
Expand Down
2 changes: 1 addition & 1 deletion cms-jenkins-api
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# A script to communicate with jenkins in a secure way.
from __future__ import print_function
import json
Expand Down
2 changes: 1 addition & 1 deletion cmsdist-comp-pr-process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from sys import exit,argv
from re import match
Expand Down
2 changes: 1 addition & 1 deletion cmssw_known_errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from copy import deepcopy

Expand Down
2 changes: 1 addition & 1 deletion cmssw_l2/update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from sys import argv, exit
from json import load,dump
try: from categories import CMSSW_L2
Expand Down
2 changes: 1 addition & 1 deletion comment-gh-pr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Makes a comment on Pull request on Github
"""
Expand Down
2 changes: 1 addition & 1 deletion compareTriggerResults
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Script to compare the content of edm::TriggerResults collections in EDM files across multiple workflows
- CMSSW dependencies: edmDumpEventContent, hltDiff
Expand Down
2 changes: 1 addition & 1 deletion compareTriggerResultsSummary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Script to summarise the outputs of compareTriggerResults
(i.e. the outputs of hltDiff in .json format)
Expand Down
2 changes: 1 addition & 1 deletion condor/tests/node-check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from sys import exit, argv
from os import pipe, close, fork, fdopen, write, waitpid
Expand Down
2 changes: 1 addition & 1 deletion create-gh-issue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github
from os.path import expanduser, abspath, dirname, join, exists
Expand Down
2 changes: 1 addition & 1 deletion create-gh-pr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github
from os.path import expanduser
Expand Down
2 changes: 1 addition & 1 deletion create-gh-release.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys, json
from os.path import expanduser
Expand Down
2 changes: 1 addition & 1 deletion create-github-hooks
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github
from os.path import expanduser, exists, join, dirname, abspath
Expand Down
2 changes: 1 addition & 1 deletion create-new-data-pr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from github import Github
from optparse import OptionParser
Expand Down
2 changes: 1 addition & 1 deletion create_json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import sys, re, json
from os import environ, popen
Expand Down
2 changes: 1 addition & 1 deletion das-utils/CMSWeb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from os import getuid
import json
Expand Down
2 changes: 1 addition & 1 deletion das-utils/cleanup-unused-ibeos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import json
from time import time
Expand Down
2 changes: 1 addition & 1 deletion das-utils/das_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from sys import exit
from os import environ
Expand Down
2 changes: 1 addition & 1 deletion das-utils/ib-datasets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from os.path import dirname, abspath
from sys import argv
from time import time
Expand Down
2 changes: 1 addition & 1 deletion das-utils/ib-eos-files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from sys import exit, version_info
from os.path import abspath, dirname, exists, getmtime
import json
Expand Down
2 changes: 1 addition & 1 deletion das-utils/order-das-files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from sys import stdin, exit

Expand Down
2 changes: 1 addition & 1 deletion deprecate-releases
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# A script to generate the list of releases to deprecate, via a set of regexp.
# TODO unused
Expand Down
2 changes: 1 addition & 1 deletion docker/check-repositories.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
from os.path import exists, dirname, abspath
Expand Down
2 changes: 1 addition & 1 deletion es-cleanup-indexes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# A script which deletes elasticsearch logs when they are older that the specified amount
# of units.
Expand Down
2 changes: 1 addition & 1 deletion es-reindex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# A script which creates a new index using a new mapping and create an alias
# for the old index name.
Expand Down
2 changes: 1 addition & 1 deletion es/es_close_indexes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from os.path import dirname, abspath
import sys, re
Expand Down
2 changes: 1 addition & 1 deletion es/es_delete_indexes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from os.path import dirname, abspath
import sys
Expand Down
2 changes: 1 addition & 1 deletion es/es_get_templates.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from os.path import dirname, abspath, join
import sys
Expand Down
2 changes: 1 addition & 1 deletion es/es_git_repo_size.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from hashlib import sha1
import sys, json
from time import time
Expand Down
2 changes: 1 addition & 1 deletion es/es_open_indexes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
from os.path import dirname, abspath
Expand Down
2 changes: 1 addition & 1 deletion es/es_send_templates.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import json
import sys
Expand Down
2 changes: 1 addition & 1 deletion es/es_show_indexes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
from os.path import dirname, abspath
Expand Down
2 changes: 1 addition & 1 deletion es_cmsdoxygen_apache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import re
from sys import exit
Expand Down
2 changes: 1 addition & 1 deletion es_cmsrep_apache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from sys import exit
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion es_cmssdt_apache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import re
from sys import exit
Expand Down
2 changes: 1 addition & 1 deletion es_doxygen_apache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import re
from sys import exit
Expand Down
2 changes: 1 addition & 1 deletion es_externals_stats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from sys import argv
from es_utils import es_send_external_stats

Expand Down
2 changes: 1 addition & 1 deletion es_hypernews.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys, os, re
from datetime import datetime,timedelta
Expand Down
2 changes: 1 addition & 1 deletion es_hypernews_log.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from _py2with3compatibility import run_cmd
import re, sys, datetime
from es_utils import send_payload
Expand Down
2 changes: 1 addition & 1 deletion es_ib_build_stats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import re, json, sys
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion es_reindex_indexes_with_pattern.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from es_utils import get_indexes, open_index, close_index, delete_index, send_request
import sys
Expand Down
2 changes: 1 addition & 1 deletion es_relval_log.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from hashlib import sha1
import os, sys,json , re
Expand Down
2 changes: 1 addition & 1 deletion es_relval_stats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from sys import exit, argv
from _py2with3compatibility import run_cmd
Expand Down
2 changes: 1 addition & 1 deletion es_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import json, re, ssl, base64
from os.path import exists
Expand Down
2 changes: 1 addition & 1 deletion fix-backport-labels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import re
from github import Github
Expand Down
2 changes: 1 addition & 1 deletion fix-igprof-sql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
import re
Expand Down
2 changes: 1 addition & 1 deletion forward-pull-requests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# Given a branch, gets all of its pull requests
# and recreates them in a different branch.
Expand Down
Loading
Loading