Skip to content

Commit 5b42f83

Browse files
committed
Added support for HTCondor v2 Python bindings
1 parent 5c35cd2 commit 5b42f83

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Fixed GCE billing.
1212
### New features / functionalities
1313

1414
- Improved compatibility and separation with GlideinWMS Frontend
15+
- Added HTCondor v2 Python binding support (PR #526)
1516

1617
### Changed defaults / behaviours
1718

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"gcs-oauth2-boto-plugin >= 2.7",
1919
"google-api-python-client >= 1.12.8",
2020
"google_auth >= 1.16.0",
21-
"htcondor >= 9.0.0, < 25.0.0",
21+
"htcondor >= 9.0.0",
2222
"numpy >= 1.19.5, < 2.0.0; python_version >= '3.7'",
2323
"pandas >= 1.5.3, < 2.0.0; python_version >= '3.7'",
2424
"pem",

src/decisionengine_modules/htcondor/htcondor_query.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
import os
99
import sys
1010

11-
import htcondor
11+
try:
12+
import htcondor # pylint: disable=import-error
13+
except ImportError:
14+
import htcondor2 as htcondor # pylint: disable=import-error
1215

1316

1417
class QueryError(RuntimeError):

src/decisionengine_modules/htcondor/publishers/publisher.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@
66

77
from functools import partial
88

9-
import classad
10-
import htcondor
119
import pandas
1210

1311
from decisionengine.framework.modules import Publisher
1412
from decisionengine.framework.modules.Publisher import Parameter
1513
from decisionengine_modules.util.retry_function import retry_wrapper
1614

15+
try:
16+
import classad # pylint: disable=import-error
17+
import htcondor # pylint: disable=import-error
18+
except ImportError:
19+
import classad2 as classad # pylint: disable=import-error
20+
import htcondor2 as htcondor # pylint: disable=import-error
21+
22+
1723
DEFAULT_UPDATE_AD_COMMAND = "UPDATE_AD_GENERIC"
1824
DEFAULT_INVALIDATE_AD_COMMAND = "INVALIDATE_ADS_GENERIC"
1925

src/decisionengine_modules/util/testutils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import datetime # noqa: F401
88

99
# These imports needed for the `eval` blocks
10-
from classad import classad # noqa: F401
10+
try:
11+
from classad import classad # noqa: F401 # pylint: disable=import-error
12+
except ImportError:
13+
from classad2 import classad # noqa: F401 # pylint: disable=import-error
1114

1215

1316
def input_from_file(fname):

0 commit comments

Comments
 (0)