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

python/adbc_driver_manager: test_lowlevel.py::test_pycapsule failed with PyArrow >= 17 #2111

Closed
kou opened this issue Aug 31, 2024 · 3 comments · Fixed by #2112
Closed

python/adbc_driver_manager: test_lowlevel.py::test_pycapsule failed with PyArrow >= 17 #2111

kou opened this issue Aug 31, 2024 · 3 comments · Fixed by #2112
Labels
Type: enhancement New feature or request

Comments

@kou
Copy link
Member

kou commented Aug 31, 2024

What feature or improvement would you like to see?

../venv-source/lib/python3.12/site-packages/_pytest/python_api.py:1019: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ExceptionInfo ArrowInvalid('Cannot import released Arrow Stream') tblen=5>
regexp = 'Cannot import released ArrowArrayStream'

    def match(self, regexp: str | Pattern[str]) -> Literal[True]:
        """Check whether the regular expression `regexp` matches the string
        representation of the exception using :func:`python:re.search`.
    
        If it matches `True` is returned, otherwise an `AssertionError` is raised.
        """
        __tracebackhide__ = True
        value = self._stringify_exception(self.value)
        msg = f"Regex pattern did not match.\n Regex: {regexp!r}\n Input: {value!r}"
        if regexp == value:
            msg += "\n Did you mean to `re.escape()` the regex?"
>       assert re.search(regexp, value), msg
E       AssertionError: Regex pattern did not match.
E        Regex: 'Cannot import released ArrowArrayStream'
E        Input: 'Cannot import released Arrow Stream'

../venv-source/lib/python3.12/site-packages/_pytest/_code/code.py:722: AssertionError
=========================== short test summary info ============================
FAILED python/adbc_driver_manager/tests/test_lowlevel.py::test_pycapsule - AssertionError: Regex pattern did not match.
 Regex: 'Cannot import released ArrowArrayStream'
 Input: 'Cannot import released Arrow Stream'

with pytest.raises(ValueError, match="Cannot import released ArrowArrayStream"):

uses ... ArrowArrayStream as the expected error message but https://github.com/apache/arrow/pull/40807/files#diff-8897de719613dfdec93c98eca5567d157a0848802cf8554959ca2ebdde3c6839L2329-R2448 (Hmm, we need to "Load diff" of bridge.cc explicitly) changed the error message. So the test works with PyArrow < 17 but doesn't work with PyArrow >= 17.

Can we relax the error message pattern or something to support both of old PyArrow and new PyArrow?
Or we may be able to drop support for old PyArrow in our test.

@kou kou added the Type: enhancement New feature or request label Aug 31, 2024
@lidavidm
Copy link
Member

lidavidm commented Sep 1, 2024

We can relax the pattern

@lidavidm lidavidm changed the title pytyon/adbc_driver_manager: test_lowlevel.py::test_pycapsule failed with PyArrow >= 17 python/adbc_driver_manager: test_lowlevel.py::test_pycapsule failed with PyArrow >= 17 Sep 1, 2024
@lidavidm lidavidm added this to the ADBC Libraries 15 milestone Sep 2, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Sep 2, 2024
@lidavidm
Copy link
Member

lidavidm commented Sep 2, 2024

Ah, I had pinned pyarrow...let's try unpinning things

lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Sep 2, 2024
@lidavidm
Copy link
Member

lidavidm commented Sep 2, 2024

We should be better about testing different versions: #2113

lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Sep 2, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants