Spec: Version and platform checking underspecified
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 302
- Avg merge
- 23h
- Merged PRs (30d)
- 8
Description
Currently, the "Version and platform checking" section of the typing spec is very barebones. It basically says:
Type checkers are expected to understand simple version and platform checks. [...] Don’t expect a checker to understand obfuscations like
"".join(reversed(sys.platform)) == "xunil".
Of course, there's a world of difference between these two forms.
The type stubs document goes into a bit more of detail, and reflects the currently implemented functionality quite well, as far as I know. It would be a good starting point.
Maybe it would also make sense to support platform checks using startswith(), as that is officially recommended in the Python docs, and is required to properly support some Unix variants, like FreeBSD, that include the version number in the platform string. See also python/typeshed#11876.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the typing spec's “Version and platform checking” section with the linked type stubs document, which reflects current behavior. Review the Python documentation and typeshed issue linked in the report, then define the supported checks and decide whether startswith() belongs in the specification. Done means the spec describes the intended version and platform-checking behavior precisely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100