Skip to content

Conversation

last-partizan
Copy link
Contributor

Refs #562

@last-partizan
Copy link
Contributor Author

@francoisfreitag please, take a look!

francoisfreitag added a commit to francoisfreitag/django-phonenumber-field that referenced this pull request Aug 7, 2025
This reverts commit c3a31bb.

Mypy itself crashes on the tip of the branch, and it provides little
value in its current state.

stefanfoulis#567 was
offered to improve the type checking, but that PR introduces convoluted
workarounds to runtime code, for type checking usage.

We can reconsider when Django officially supports typing or when the
typing ecosystem can be used to better document and verify the code,
without requiring complex workarounds.

https://github.com/stefanfoulis/django-phonenumber-field/pull/567/files#diff-82109bfd2869a9307c952d21292dc118e522d7fb07ca87d1e607ff9b192c666fR51-R60
francoisfreitag added a commit to francoisfreitag/django-phonenumber-field that referenced this pull request Aug 7, 2025
This reverts commit c3a31bb.

Mypy itself crashes on the tip of the branch, and it provides little
value in its current state.

```
$ mypy tests --no-check-untyped-defs
/home/runner/work/django-phonenumber-field/django-phonenumber-field/.tox/mypy/lib/python3.13/site-packages/django-stubs/contrib/auth/forms.pyi:82: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.17.1
```

stefanfoulis#567 was
offered to improve the type checking, but that PR introduces convoluted
workarounds to runtime code, for type checking usage.

We can reconsider when Django officially supports typing or when the
typing ecosystem can be used to better document and verify the code,
without requiring complex workarounds.

https://github.com/stefanfoulis/django-phonenumber-field/pull/567/files#diff-82109bfd2869a9307c952d21292dc118e522d7fb07ca87d1e607ff9b192c666fR51-R60
@francoisfreitag
Copy link
Collaborator

I’m closing this PR per #637. I am thankful for your work, but it looks like the tooling requires pretty complex workarounds to support typing in this library. I would rather stick to code that’s easy to read and maintain.

francoisfreitag added a commit that referenced this pull request Aug 22, 2025
This reverts commit c3a31bb.

Mypy itself crashes on the tip of the branch, and it provides little
value in its current state.

```
$ mypy tests --no-check-untyped-defs
/home/runner/work/django-phonenumber-field/django-phonenumber-field/.tox/mypy/lib/python3.13/site-packages/django-stubs/contrib/auth/forms.pyi:82: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.17.1
```

#567 was
offered to improve the type checking, but that PR introduces convoluted
workarounds to runtime code, for type checking usage.

We can reconsider when Django officially supports typing or when the
typing ecosystem can be used to better document and verify the code,
without requiring complex workarounds.

https://github.com/stefanfoulis/django-phonenumber-field/pull/567/files#diff-82109bfd2869a9307c952d21292dc118e522d7fb07ca87d1e607ff9b192c666fR51-R60
francoisfreitag added a commit to bblanchon/django-phonenumber-field that referenced this pull request Aug 22, 2025
This reverts commit c3a31bb.

Mypy itself crashes on the tip of the branch, and it provides little
value in its current state.

```
$ mypy tests --no-check-untyped-defs
/home/runner/work/django-phonenumber-field/django-phonenumber-field/.tox/mypy/lib/python3.13/site-packages/django-stubs/contrib/auth/forms.pyi:82: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.17.1
```

stefanfoulis#567 was
offered to improve the type checking, but that PR introduces convoluted
workarounds to runtime code, for type checking usage.

We can reconsider when Django officially supports typing or when the
typing ecosystem can be used to better document and verify the code,
without requiring complex workarounds.

https://github.com/stefanfoulis/django-phonenumber-field/pull/567/files#diff-82109bfd2869a9307c952d21292dc118e522d7fb07ca87d1e607ff9b192c666fR51-R60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants