René's URL Explorer Experiment


Title: [Python] type checkers broken for pyarrow.compute and other sub-modules since PyArrow 24.0+ · Issue #49831 · apache/arrow · GitHub

Open Graph Title: [Python] type checkers broken for pyarrow.compute and other sub-modules since PyArrow 24.0+ · Issue #49831 · apache/arrow

X Title: [Python] type checkers broken for pyarrow.compute and other sub-modules since PyArrow 24.0+ · Issue #49831 · apache/arrow

Description: Describe the bug, including details regarding any error messages, version, and platform. Consider the following snippet: docker run \ --rm \ -it python:3.13 \ bash pip install 'pyarrow>=24.0' 'mypy' cat > test.py <

Open Graph Description: Describe the bug, including details regarding any error messages, version, and platform. Consider the following snippet: docker run \ --rm \ -it python:3.13 \ bash pip install 'pyarrow>=24.0' 'mypy...

X Description: Describe the bug, including details regarding any error messages, version, and platform. Consider the following snippet: docker run \ --rm \ -it python:3.13 \ bash pip install 'pyarrow>=24.0...

Opengraph URL: https://github.com/apache/arrow/issues/49831

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Python] type checkers broken for pyarrow.compute and other sub-modules since PyArrow 24.0+","articleBody":"### Describe the bug, including details regarding any error messages, version, and platform.\n\nConsider the following snippet:\n\n```shell\ndocker run \\\n  --rm \\\n  -it python:3.13 \\\n  bash\n\npip install 'pyarrow\u003e=24.0' 'mypy'\n\ncat \u003e test.py \u003c\u003cEOF\nimport pyarrow as pa\nimport pyarrow.compute as pa_compute\n\ndef all_ones(arr) -\u003e bool:\n    return pa_compute.all(pa_compute.equal(arr, 1))\n\nif __name__ == \"__main__\":\n    X = pa.array([1, 1, 1])\n    print(f\"all ones?: {all_ones(X)}\")\nEOF\n```\n\nThis is totally plausible `pyarrow` code and works as expected.\n\n```console\n$ python ./test.py\nall ones?: True\n```\n\nBut `mypy` complains about it referencing things that don't exist in `pyarrow`\n\n```console\n$ mypy --version\nmypy 1.20.2 (compiled: yes)\n\n$ mypy ./test.py\ntest.py:5: error: Module has no attribute \"all\"  [attr-defined]\ntest.py:5: error: Module has no attribute \"equal\"  [attr-defined]\nFound 2 errors in 1 file (checked 1 source file)\n```\n\n## Notes\n\nSimilar errors are not surfaced by type checkers like `mypy` on `pyarrow\u003c24`, so I strongly suspect this is related  to something new in the 24.0 release. Possibly the introduction of type-checking infrastructure (a `py.typed` file and `.pyi` stubs), around #48618\n\nMaybe the `.pyi` stub file(s) are incomplete? At https://mypy.readthedocs.io/en/stable/stubs.html#creating-a-stub, I see:\n\n\u003e _If a directory contains both a `.py` and a `.pyi` file for the same module, the `.pyi` file takes precedence._\n\nOr maybe `mypy` does not handle well situations where things are added to `globals` at import time like this?\n\nhttps://github.com/apache/arrow/blob/acd8e442939b5fbf90d0cd65ca506514ec3851c4/python/pyarrow/compute.py#L343\n\nThanks for your time and consideration.\n\n### Component(s)\n\nPython","author":{"url":"https://github.com/jameslamb","@type":"Person","name":"jameslamb"},"datePublished":"2026-04-21T21:27:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/49831/arrow/issues/49831"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b2b49f26-bf67-1885-5db7-e49acfa178d1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB984:3026F0:227F21A:31598E4:6A4BE830
html-safe-noncee51ae4d7395e410fbac31069fb9adc5f12227ff2ead2a6428ed834303cfc0dcd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTg0OjMwMjZGMDoyMjdGMjFBOjMxNTk4RTQ6NkE0QkU4MzAiLCJ2aXNpdG9yX2lkIjoiNzU2NjQzMzg5NzA1MjYyOTA0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac90fee2ad8a7b5caa58193d63a64b2d77097bec86c0fd314fe1f5047ef30732e1
hovercard-subject-tagissue:4305382489
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/arrow/49831/issue_layout
twitter:imagehttps://opengraph.githubassets.com/018a975ed6b6cee5c6e45447395e6ff7a63a33eefdf0e625134c6aae656423a1/apache/arrow/issues/49831
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/018a975ed6b6cee5c6e45447395e6ff7a63a33eefdf0e625134c6aae656423a1/apache/arrow/issues/49831
og:image:altDescribe the bug, including details regarding any error messages, version, and platform. Consider the following snippet: docker run \ --rm \ -it python:3.13 \ bash pip install 'pyarrow>=24.0' 'mypy...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejameslamb
hostnamegithub.com
expected-hostnamegithub.com
None0f5d3ba365b3985d75c32a5957c8635488d58dcf027ae6ae958eee7edaa306a2
turbo-cache-controlno-preview
go-importgithub.com/apache/arrow git https://github.com/apache/arrow.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id51905353
octolytics-dimension-repository_nwoapache/arrow
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51905353
octolytics-dimension-repository_network_root_nwoapache/arrow
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef24da9b76b42d77b0bb458f810509565e9ba5f1a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/arrow/issues/49831#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Farrow%2Fissues%2F49831
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Farrow%2Fissues%2F49831
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=apache%2Farrow
Reloadhttps://github.com/apache/arrow/issues/49831
Reloadhttps://github.com/apache/arrow/issues/49831
Reloadhttps://github.com/apache/arrow/issues/49831
Please reload this pagehttps://github.com/apache/arrow/issues/49831
apache https://github.com/apache
arrowhttps://github.com/apache/arrow
Notifications https://github.com/login?return_to=%2Fapache%2Farrow
Fork 4.2k https://github.com/login?return_to=%2Fapache%2Farrow
Star 16.9k https://github.com/login?return_to=%2Fapache%2Farrow
Code https://github.com/apache/arrow
Issues 2.2k https://github.com/apache/arrow/issues
Pull requests 328 https://github.com/apache/arrow/pulls
Discussions https://github.com/apache/arrow/discussions
Actions https://github.com/apache/arrow/actions
Projects https://github.com/apache/arrow/projects
Security and quality 0 https://github.com/apache/arrow/security
Insights https://github.com/apache/arrow/pulse
Code https://github.com/apache/arrow
Issues https://github.com/apache/arrow/issues
Pull requests https://github.com/apache/arrow/pulls
Discussions https://github.com/apache/arrow/discussions
Actions https://github.com/apache/arrow/actions
Projects https://github.com/apache/arrow/projects
Security and quality https://github.com/apache/arrow/security
Insights https://github.com/apache/arrow/pulse
[Python] type checkers broken for pyarrow.compute and other sub-modules since PyArrow 24.0+https://github.com/apache/arrow/issues/49831#top
https://github.com/rok
Component: Pythonhttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22Component%3A%20Python%22
Priority: BlockerMarks a blocker for the releasehttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22Priority%3A%20Blocker%22
Type: bughttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22Type%3A%20bug%22
backport-candidatehttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22backport-candidate%22
25.0.0https://github.com/apache/arrow/milestone/74
https://github.com/jameslamb
jameslambhttps://github.com/jameslamb
on Apr 21, 2026https://github.com/apache/arrow/issues/49831#issue-4305382489
#48618https://github.com/apache/arrow/pull/48618
https://mypy.readthedocs.io/en/stable/stubs.html#creating-a-stubhttps://mypy.readthedocs.io/en/stable/stubs.html#creating-a-stub
arrow/python/pyarrow/compute.pyhttps://github.com/apache/arrow/blob/acd8e442939b5fbf90d0cd65ca506514ec3851c4/python/pyarrow/compute.py#L343
acd8e44https://github.com/apache/arrow/commit/acd8e442939b5fbf90d0cd65ca506514ec3851c4
rokhttps://github.com/rok
Component: Pythonhttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22Component%3A%20Python%22
Priority: BlockerMarks a blocker for the releasehttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22Priority%3A%20Blocker%22
Type: bughttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22Type%3A%20bug%22
backport-candidatehttps://github.com/apache/arrow/issues?q=state%3Aopen%20label%3A%22backport-candidate%22
25.0.0https://github.com/apache/arrow/milestone/74
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.