#!/usr/bin/env python
import os
from typing import List

from setuptools import find_packages, setup


def find_stub_files(name: str) -> List[str]:
    result = []
    for root, _dirs, files in os.walk(name):
        for file in files:
            if file.endswith(".pyi"):
                if os.path.sep in root:
                    sub_root = root.split(os.path.sep, 1)[-1]
                    file = os.path.join(sub_root, file)
                result.append(file)
    return result


with open("README.md") as f:
    readme = f.read()

dependencies = [
    "mypy>=1.0.0",
    "django",
    "django-stubs-ext>=4.2.0",
    "tomli; python_version < '3.11'",
    # Types:
    "typing-extensions",
    "types-pytz",
    "types-PyYAML",
]

extras_require = {
    "compatible-mypy": ["mypy>=1.2.0,<1.3"],
}

setup(
    name="django-stubs",
    version="4.2.0",
    description="Mypy stubs for Django",
    long_description=readme,
    long_description_content_type="text/markdown",
    license="MIT",
    license_files=["LICENSE.md"],
    url="https://github.com/typeddjango/django-stubs",
    author="Maksim Kurnikov",
    author_email="maxim.kurnikov@gmail.com",
    maintainer="Marti Raudsepp",
    maintainer_email="marti@juffo.org",
    py_modules=[],
    python_requires=">=3.8",
    install_requires=dependencies,
    extras_require=extras_require,
    packages=["django-stubs", *find_packages(exclude=["scripts"])],
    package_data={
        "django-stubs": find_stub_files("django-stubs"),
        "mypy_django_plugin": ["py.typed"],
    },
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Typing :: Typed",
        "Framework :: Django",
        "Framework :: Django :: 2.2",
        "Framework :: Django :: 3.0",
        "Framework :: Django :: 3.1",
        "Framework :: Django :: 3.2",
        "Framework :: Django :: 4.1",
        "Framework :: Django :: 4.2",
    ],
    project_urls={
        "Release notes": "https://github.com/typeddjango/django-stubs/releases",
    },
)

setup.py
#!/usr/bin/env python
import os
from typing import List

from setuptools import find_packages, setup


def find_stub_files(name: str) -> List[str]:
    result = []
    for root, _dirs, files in os.walk(name):
        for file in files:
            if file.endswith(".pyi"):
                if os.path.sep in root:
                    sub_root = root.split(os.path.sep, 1)[-1]
                    file = os.path.join(sub_root, file)
                result.append(file)
    return result


with open("README.md") as f:
    readme = f.read()

dependencies = [
    "mypy>=1.0.0",
    "django",
    "django-stubs-ext>=4.2.0",
    "tomli; python_version < '3.11'",
    # Types:
    "typing-extensions",
    "types-pytz",
    "types-PyYAML",
]

extras_require = {
    "compatible-mypy": ["mypy>=1.3.0,<1.4"],
}

setup(
    name="django-stubs",
    version="4.2.0",
    description="Mypy stubs for Django",
    long_description=readme,
    long_description_content_type="text/markdown",
    license="MIT",
    license_files=["LICENSE.md"],
    url="https://github.com/typeddjango/django-stubs",
    author="Maksim Kurnikov",
    author_email="maxim.kurnikov@gmail.com",
    maintainer="Marti Raudsepp",
    maintainer_email="marti@juffo.org",
    py_modules=[],
    python_requires=">=3.8",
    install_requires=dependencies,
    extras_require=extras_require,
    packages=["django-stubs", *find_packages(exclude=["scripts"])],
    package_data={
        "django-stubs": find_stub_files("django-stubs"),
        "mypy_django_plugin": ["py.typed"],
    },
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Typing :: Typed",
        "Framework :: Django",
        "Framework :: Django :: 2.2",
        "Framework :: Django :: 3.0",
        "Framework :: Django :: 3.1",
        "Framework :: Django :: 3.2",
        "Framework :: Django :: 4.1",
        "Framework :: Django :: 4.2",
    ],
    project_urls={
        "Release notes": "https://github.com/typeddjango/django-stubs/releases",
    },
)

setup.py
diff --git a/requirements.txt b/requirements.txt
index aff813d34..9d13a3eb9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -10,4 +10,4 @@ Django==4.2.1
 -e .[compatible-mypy]
 
 # Overrides:
-mypy==1.2.0
+mypy==1.3.0
diff --git a/setup.py b/setup.py
old mode 100755
new mode 100644
index 3a112732e..6fe422421
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ def find_stub_files(name: str) -> List[str]:
 ]
 
 extras_require = {
-    "compatible-mypy": ["mypy>=1.2.0,<1.3"],
+    "compatible-mypy": ["mypy>=1.3.0,<1.4"],
 }
 
 setup(

Bump mypy from 1.2.0 to 1.3.0
Bumps [mypy](https://github.com/python/mypy) from 1.2.0 to 1.3.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/python/mypy/commit/9df39ab1801369cb49467fa52080df9c42377384"><code>9df39ab</code></a> set version to 1.3.0</li>
<li><a href="https://github.com/python/mypy/commit/c1464a9ea61fe9c350b61c1989d98bbc33d74982"><code>c1464a9</code></a> Revert &quot;Fix disappearing errors when re-running dmypy check (<a href="https://redirect.github.com/python/mypy/issues/14835">#14835</a>)&quot; (<a href="https://redirect.github.com/python/mypy/issues/15179">#15179</a>)</li>
<li><a href="https://github.com/python/mypy/commit/d887e9c0d090694b66b5fa20ac249b3d749a8518"><code>d887e9c</code></a> Fix performance in union subtyping (<a href="https://redirect.github.com/python/mypy/issues/15104">#15104</a>)</li>
<li><a href="https://github.com/python/mypy/commit/320b883ada83375f1e6929b4703b741d3c4813ce"><code>320b883</code></a> Typeshed cherry-pick: stdlib/xml: fix return types for toxml/toprettyxml meth...</li>
<li><a href="https://github.com/python/mypy/commit/6a68049e903dba7bbcff5a530b63731535f8d5f7"><code>6a68049</code></a> Fix sys.platform when cross-compiling with emscripten (<a href="https://redirect.github.com/python/mypy/issues/14888">#14888</a>)</li>
<li><a href="https://github.com/python/mypy/commit/3d9661c91d5dfaf3ae0d3ca5624867cdf449da77"><code>3d9661c</code></a> Fix bounded self types in override incompatibility checking (<a href="https://redirect.github.com/python/mypy/issues/15045">#15045</a>)</li>
<li><a href="https://github.com/python/mypy/commit/0799a8ab0dc8deed8d2e0ec34b1aab2fe39ebd96"><code>0799a8a</code></a> [mypyc] Fix unions of bools and ints (<a href="https://redirect.github.com/python/mypy/issues/15066">#15066</a>)</li>
<li><a href="https://github.com/python/mypy/commit/4276308be01ea498d946a79554b4a10b1cf13ccb"><code>4276308</code></a> (🎁) update black to 23.3.0 (<a href="https://redirect.github.com/python/mypy/issues/15059">#15059</a>)</li>
<li><a href="https://github.com/python/mypy/commit/14493660eadf35553a3cecb746704b58a401c68d"><code>1449366</code></a> Allow objects matching <code>SupportsKeysAndGetItem</code> to be unpacked (<a href="https://redirect.github.com/python/mypy/issues/14990">#14990</a>)</li>
<li><a href="https://github.com/python/mypy/commit/69c774e6d6fa92aea8f32cd0e045e8a34a0f7215"><code>69c774e</code></a> Sync typeshed (<a href="https://redirect.github.com/python/mypy/issues/15055">#15055</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/python/mypy/compare/v1.2.0...v1.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mypy&package-manager=pip&previous-version=1.2.0&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
