-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
We need to carry a custom patch for jaydebeapi as it doesn't support latest jpype currently and no release is happening. See baztian/jaydebeapi#107. Originally submitted as #4402.
- Loading branch information
Showing
5 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
omnibus/config/patches/datadog-agent-integrations-py2/jpype_0_7.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/__init__.py | ||
+++ b/__init__.py | ||
@@ -173,7 +173,19 @@ def _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs): | ||
# jvm_path = ('/usr/lib/jvm/java-6-openjdk' | ||
# '/jre/lib/i386/client/libjvm.so') | ||
jvm_path = jpype.getDefaultJVMPath() | ||
- jpype.startJVM(jvm_path, *args) | ||
+ jpype_ver = 0. | ||
+ if hasattr(jpype, '__version__'): | ||
+ try: | ||
+ ver_match = re.match('\d+\.\d+', jpype.__version__) | ||
+ if ver_match: | ||
+ jpype_ver = float(ver_match.group(0)) | ||
+ except ValueError: | ||
+ pass | ||
+ if jpype_ver < 0.7: | ||
+ jpype.startJVM(jvm_path, *args) | ||
+ else: | ||
+ jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True, | ||
+ convertStrings=True) | ||
if not jpype.isThreadAttachedToJVM(): | ||
jpype.attachThreadToJVM() | ||
if _jdbc_name_to_const is None: |
23 changes: 23 additions & 0 deletions
23
omnibus/config/patches/datadog-agent-integrations-py3/jpype_0_7.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/__init__.py | ||
+++ b/__init__.py | ||
@@ -173,7 +173,19 @@ def _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs): | ||
# jvm_path = ('/usr/lib/jvm/java-6-openjdk' | ||
# '/jre/lib/i386/client/libjvm.so') | ||
jvm_path = jpype.getDefaultJVMPath() | ||
- jpype.startJVM(jvm_path, *args) | ||
+ jpype_ver = 0. | ||
+ if hasattr(jpype, '__version__'): | ||
+ try: | ||
+ ver_match = re.match('\d+\.\d+', jpype.__version__) | ||
+ if ver_match: | ||
+ jpype_ver = float(ver_match.group(0)) | ||
+ except ValueError: | ||
+ pass | ||
+ if jpype_ver < 0.7: | ||
+ jpype.startJVM(jvm_path, *args) | ||
+ else: | ||
+ jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True, | ||
+ convertStrings=True) | ||
if not jpype.isThreadAttachedToJVM(): | ||
jpype.attachThreadToJVM() | ||
if _jdbc_name_to_const is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
releasenotes/notes/patch-jaydebeapi-for-new-jpype-23b8199845e669d7.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
fixes: | ||
- | | ||
Carry a custom patch for jaydebeapi to support latest jpype. |