Bug #6563
openMissing py stubs in saxonche (12.5)
100%
Description
SaxonC 12.5 Python wheels do not include the stubs, which are essential for IDEs to provide autocompletion, type inference, and better code assistance.
Stubs (.pyi files) are required when the library is a compiled C extension, or IDEs like PyCharm can't properly infer types, methods, or classes, making development harder due to the lack of autocomplete and reference resolution.
Related issues
Updated by Yannick Einsweiler about 1 month ago
- Copied from Bug #6277: How to build saxonche 12 under Windows? added
Updated by Yannick Einsweiler about 1 month ago
Luckily someone created a separate package for that saxonche-stubs
(https://pypi.org/project/saxonche-stubs/#description) but it's a subset and could become outdated. Ideally, the stubs should be part of the main library distribution.
Updated by O'Neil Delpratt about 1 month ago
- SaxonC Platforms All added
- SaxonC Platforms deleted (
Linux)
Thanks for creating this bug issue. Yes this is something we should do and is on our todo list.
Updated by Bastian Politycki 13 days ago
O'Neil Delpratt wrote in #note-3:
Thanks for creating this bug issue. Yes this is something we should do and is on our todo list.
That's great! Is there already a detailed schedule? The saxonche-stubs package is indeed not complete. So far, I have only implemented types that I needed myself. However, I have no objections to stopping the development if the type annotations are integrated directly into the Saxon-Python package.
Updated by Matt Patterson 12 days ago
Bastian Politycki wrote in #note-4:
That's great! Is there already a detailed schedule? The saxonche-stubs package is indeed not complete.
We can't commit to a date or release, unfortunately. I'll be taking a look at your package with interest, but the process for generating .pyi stubs programmatically from Cython sources, rather than manually, looks like it's complex and existing tooling looks tricky to use reliably.
(If you have experience with that process, I'd love to hear about it.)
Updated by Yannick Einsweiler 11 days ago
Matt Patterson wrote in #note-5:
We can't commit to a date or release, unfortunately. I'll be taking a look at your package with interest, but the process for generating .pyi stubs programmatically from Cython sources, rather than manually, looks like it's complex and existing tooling looks tricky to use reliably.
Just my 2 cents: using a LLM ?
Updated by O'Neil Delpratt 4 days ago
Official documentation for stub file can be found here: https://peps.python.org/pep-0484/#stub-files
Updated by O'Neil Delpratt 4 days ago
- Assignee changed from O'Neil Delpratt to Matt Patterson
Please register to edit this issue