Use mypy to find backward incompatibilities between library versions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
Would it be possible to use mypy to find backward incompatibilities between versions of a library?
I'm thinking about snapshotting the signature of all modules/functions/classes at some point, and checking whether for a later version, the API is a superset/subtype (According to Liskov, probably.)
Pitch
Feel free to close if this doesn't belong here. But I've the impression that Mypy has the logic to figure out whether one function or class is a subtype of another, so I wonder whether that would be possible for a package as a whole. This would be a big help to discover breaking changes in a library.
Contributor guide
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
The issue names no files, tests, or entry points. Start by examining mypy's existing subtype-checking and API analysis capabilities, then determine how library signatures could be captured and compared across versions. Done would require a defined, implementable approach for detecting backward-incompatible changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100