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

Bump jaydebeapi and jpype1 #6963

Merged
merged 20 commits into from
Aug 25, 2020
Merged

Bump jaydebeapi and jpype1 #6963

merged 20 commits into from
Aug 25, 2020

Conversation

hithwen
Copy link
Contributor

@hithwen hithwen commented Jun 24, 2020

TL;DR: We're performing a patch on jaydebeapi that has been solved in newer versions. However the new version has different requirements on py2 and py3

Related to: baztian/jaydebeapi#117

Original patches:

Omnibus change: DataDog/datadog-agent#5830

Pinning jpype1==0.7.1 causes this error on py3:

E       import jpype
E     File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/jpype/__init__.py", line 17, in <module>
E       import _jpype
E   ImportError: numpy.core.multiarray failed to import

Options are to pin jpype1 in py2 and py3 differently or pin numpy>=1.16.0 as well

Copy link
Member

@AlexandreYang AlexandreYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the next step is to remove the patch from datadog-agent repo. Could you link that PR once created ?

oracle/requirements.in Outdated Show resolved Hide resolved
jaydebeapi==1.1.1
jpype1==0.7.0
jaydebeapi==1.2.3
jpype1==0.7.1 ; python_version <= '2.7' # 0.7.5 it's not py2 compatible but this specific version breaks in py3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we raise an issue on jaydebeapi repo about that ?

@stale
Copy link

stale bot commented Jul 26, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Note that this will not be automatically closed, but the notification will remind us to investigate why there's been inactivity.

@stale stale bot removed the stale label Aug 20, 2020
Update agent requirements file comment
@hithwen
Copy link
Contributor Author

hithwen commented Aug 25, 2020

getting an error on py3, but it works locally:

py38-12.2-jdbc run-test: commands[1] | pytest -v
ImportError while loading conftest '/home/vsts/work/1/s/oracle/tests/conftest.py'.
tests/conftest.py:8: in <module>
    from datadog_checks.oracle import Oracle
datadog_checks/oracle/__init__.py:6: in <module>
    from .oracle import Oracle
datadog_checks/oracle/oracle.py:16: in <module>
    import jpype
.tox/py38/lib/python3.8/site-packages/jpype/__init__.py:20: in <module>
    from ._core import *
.tox/py38/lib/python3.8/site-packages/jpype/_core.py:20: in <module>
    from . import types as _jtypes
.tox/py38/lib/python3.8/site-packages/jpype/types.py:38: in <module>
    from ._jarray import *
.tox/py38/lib/python3.8/site-packages/jpype/_jarray.py:213: in <module>
    _jcustomizer._applyCustomizerPost(_jpype._JArray, _JArrayProto)
.tox/py38/lib/python3.8/site-packages/jpype/_jcustomizer.py:166: in _applyCustomizerPost
    _applyCustomizerImpl(cls.__dict__, proto, sticky,
.tox/py38/lib/python3.8/site-packages/jpype/_jcustomizer.py:148: in _applyCustomizerImpl
    setter(p, v)
.tox/py38/lib/python3.8/site-packages/jpype/_jcustomizer.py:167: in <lambda>
    lambda p, v: type.__setattr__(cls, p, v))
E   TypeError: can't apply this __setattr__ to _jpype._JClass object

In https://stackoverflow.com/questions/62908416/error-importing-jpype-cant-apply-this-setattr-to-jpype-jclass-object
it says

This is an issue with Python 3.8.4. Refer to this mailchain. Try downgrading to Python 3.8.3 in the meantime.

Locally I have 3.8.1

@hithwen hithwen merged commit d2768d3 into master Aug 25, 2020
@hithwen hithwen deleted the julia/AI-863-bump-jaydebeapi-jpype branch August 25, 2020 14:00
github-actions bot pushed a commit that referenced this pull request Aug 25, 2020
* Bump jaydebeapi and jpype1
* Add gcc and g++ to -jdbc docker image d2768d3
KSerrania pushed a commit to DataDog/datadog-agent that referenced this pull request Aug 25, 2020
…5830)

Reverts changes added in #4425 and #4577.

Depends on: DataDog/integrations-core#6963 which bumps the dependency to a version that does not need the patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants