You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "robsdedude (via GitHub)" <gi...@apache.org> on 2026/06/08 07:58:21 UTC
[I] [Python] type checker broken for `pyarrow.compute` and other sub-modules [arrow]
robsdedude opened a new issue, #50123:
URL: https://github.com/apache/arrow/issues/50123
I think adding a `py.typed` marker to the package before all public APIs are typed (even just with a whole bunch of `Any`s) wasn't ideal. Downstream users will now see a bunch of typing errors because type checkers now assume that pyarrow provides type hints that can be relied upon.
In my case, I'm seeing `mypy` complain about `Module has no attribute "count" [attr-defined]` where the module in question is `pyarrow.compute`.
Please consider either removing the marker until type hints are ready or to make sure all public APIs exist (at least as `def xyz(*args: Any, **kwargs: Any) -> Any` stubs). Or apply the same `__getatrr__` placeholder to all modules, not just the top-level module.
_Originally posted by @robsdedude in https://github.com/apache/arrow/pull/48618#discussion_r3371590167_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] type checker broken for `pyarrow.compute` and other sub-modules [arrow]
Posted by "robsdedude (via GitHub)" <gi...@apache.org>.
robsdedude commented on issue #50123:
URL: https://github.com/apache/arrow/issues/50123#issuecomment-4646610766
# Reproducer
1. Create `foo.py`
```python
import pyarrow.compute
pyarrow.compute.count(...)
```
2. Install mypy and pyarrow: `pip install pyarrow==24.0.0 mypy==2.1.0`
3. Run `mypy`
```
$ mypy foo.py
foo.py:3: error: Module has no attribute "count" [attr-defined]
Found 1 error in 1 file (checked 1 source file)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] type checker broken for `pyarrow.compute` and other sub-modules [arrow]
Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on issue #50123:
URL: https://github.com/apache/arrow/issues/50123#issuecomment-4657654922
Going to close this as a duplicate of https://github.com/apache/arrow/issues/49831
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] type checker broken for `pyarrow.compute` and other sub-modules [arrow]
Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche closed issue #50123: [Python] type checker broken for `pyarrow.compute` and other sub-modules
URL: https://github.com/apache/arrow/issues/50123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] type checker broken for `pyarrow.compute` and other sub-modules [arrow]
Posted by "robsdedude (via GitHub)" <gi...@apache.org>.
robsdedude commented on issue #50123:
URL: https://github.com/apache/arrow/issues/50123#issuecomment-4658061686
Sorry for the noise :) my search-foo wasn't strong enough to find the other issue 🙌
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] type checker broken for `pyarrow.compute` and other sub-modules [arrow]
Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on issue #50123:
URL: https://github.com/apache/arrow/issues/50123#issuecomment-4658099338
No problem! It was a good reminder and I marked the other issue as a blocker for the next release, so we at least do the minimum fix if there has been not enough progress on the actual typing by then.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org