Skip to content

Commit

Permalink
Drop hard dependency on mypy (#495)
Browse files Browse the repository at this point in the history
As announced in 3.14.4 release notes, we will drop the hard dependency on mypy. Users of djangorestframework-stubs with mypy will need to add their own dependency on mypy, or use djangorestframework-stubs[compatible-mypy] extra.

Currently mypy remains the only supported type checker. Improvements for other type checkers may be considered in the future, pull requests welcome.

* Drop hard mypy dependency
* Transitively depend on django-stubs with [compatible-mypy] extra
* Use newer URL dependency syntax
  • Loading branch information
intgr authored Oct 22, 2023
1 parent 133e572 commit 843fd91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ djangorestframework==3.14.0
types-pytz==2023.3.1.1
types-requests==2.31.0.10
types-urllib3==1.26.25.14
git+https://github.com/typeddjango/django-stubs
git+https://github.com/typeddjango/django-stubs#subdirectory=ext
django-stubs[compatible-mypy] @ git+https://github.com/typeddjango/django-stubs
django-stubs-ext @ git+https://github.com/typeddjango/django-stubs#subdirectory=ext
-e .[compatible-mypy,coreapi,markdown]
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def find_stub_files(name: str) -> List[str]:
readme = f.read()

dependencies = [
"mypy>=0.991",
"django-stubs>=4.2.5",
"typing-extensions>=3.10.0",
"requests>=2.0.0",
Expand All @@ -30,7 +29,7 @@ def find_stub_files(name: str) -> List[str]:

# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)
extras_require = {
"compatible-mypy": ["mypy~=1.6.0"],
"compatible-mypy": ["mypy~=1.6.0", "django-stubs[compatible-mypy]"],
"coreapi": ["coreapi>=2.0.0"],
"markdown": ["types-Markdown>=0.1.5"],
}
Expand Down

0 comments on commit 843fd91

Please sign in to comment.