Skip to content

ci: fix Callable[] type hint on 3.8#6009

Merged
bschoenmaeckers merged 1 commit intoPyO3:mainfrom
davidhewitt:3.8-wrap-pyfunction
Apr 30, 2026
Merged

ci: fix Callable[] type hint on 3.8#6009
bschoenmaeckers merged 1 commit intoPyO3:mainfrom
davidhewitt:3.8-wrap-pyfunction

Conversation

@davidhewitt
Copy link
Copy Markdown
Member

Callable from abc does not support [] subscripting with type vars until Python 3.9. I wrapped the type hint in quotes to make this pass on Python 3.8.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 30, 2026

Merging this PR will improve performance by 13.8%

⚡ 1 improved benchmark
✅ 104 untouched benchmarks
⏩ 1 skipped benchmark1

Performance Changes

Benchmark BASE HEAD Efficiency
bench_pyclass_create 4.6 µs 4 µs +13.8%

Comparing davidhewitt:3.8-wrap-pyfunction (5c828e5) with main (9c734a1)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@bschoenmaeckers bschoenmaeckers added this pull request to the merge queue Apr 30, 2026
Merged via the queue into PyO3:main with commit cb9bcdc Apr 30, 2026
46 checks passed
davidhewitt added a commit to davidhewitt/pyo3 that referenced this pull request May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants