A long due update on this, given that the question popped up recently:

I worked at some time in type annotations and published some for Django
1.10 ; I'm currently not working on them, given that my current work has
not been very close to Django development

After trying a few things, the best way to get this would be:
1) Add annotations upstream. Having to maintain a separate set of
annotations is probably not sustainable and will lead to errors. This of
course needs annotations accepted by the team.
1.1) Integrate typechecking into Django's build/CI process. This would
ensure that annotations are consistent with the implementation.
1.2) Annotations do not need to be exhaustive (and there are certainly
parts of Django which could benefit from them much more than others)
2) Generate stubs from the annotated source. This was not possible when I
wrote my stubs, but I've commited the mypy improvements with that feature.
2.1)A few stubs may need to be overridden manually from the autogenerated
(I found a few examples of this when I wrote my stubs)
3) Distribute annotated files separately (not with typeshed, and probably
not with django) so people can install the version they need. Distribution
of stubs has been problematic, PEP 561 should solve it but an
implementation for it has been just merged last week into mypy, and
probably released soon.

Before PEP561 and the ability to generate stubs, I don't believe it was
practical to make this project sustainable. At this time, it might be and
it can be a good time to restart this discussion.

Best,
D

On 6 April 2018 at 12:19, Florian Apolloner <f.apollo...@gmail.com> wrote:

> To the best of my knowledge JetBrains fundled the money to Django for that
> specific purpose -- so yes the funding should be here if needed. That said,
> there is no decission on a) whether we actually want type hints and b) if
> the should be inline or stubs. Those two points have to be cleared first.
>
> Cheers,
> Florian
>
> On Friday, April 6, 2018 at 9:11:04 AM UTC+2, Eddy C wrote:
>>
>> Hi Tim, do you know if JetBrains still willing to fund the project as the
>> upcoming django 2.1 will only support python 3.5+ that pave the way for
>> inline annotations.
>>
>> On Wednesday, August 17, 2016 at 11:41:03 PM UTC+10, Tim Graham wrote:
>>>
>>> The JetBrains announcement that they want to fund the project isn't a
>>> guarantee that it'll be implemented. The feature needs to go through the
>>> normal feature acceptance process, which as Markus said, might involve a
>>> DEP.
>>>
>>> Assuming the idea is accepted, my sense on timing would be to wait until
>>> January when Django drops support for Python 2.7 and 3.4 in master. Then we
>>> could use inline annotations rather than the stub files.
>>>
>>> Past discussions of type hinting:
>>> https://groups.google.com/d/topic/django-developers/z_P1TvJ6
>>> QG8/discussion
>>> https://groups.google.com/d/topic/django-developers/xOTmq93Y
>>> ZuQ/discussion
>>>
>>> On Wednesday, August 17, 2016 at 5:30:56 AM UTC-4, Florian Apolloner
>>> wrote:
>>>>
>>>>
>>>>
>>>> On Wednesday, August 17, 2016 at 11:06:47 AM UTC+2, dmoisset wrote:
>>>>>
>>>>> @Florian
>>>>> Would you care to ellaborate? I couldn't find the post you mention
>>>>> (although requests is one of the few 3rd party projects that have support
>>>>> at the official typeshed repository, https://github.com
>>>>> /python/typeshed )
>>>>>
>>>>
>>>> https://lwn.net/Articles/643269/ and https://lwn.net/Articles/643399/
>>>> -- might be that things changed by now.
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/6f2b5dd9-f8e6-4b67-8e25-
> 585cbd802413%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/6f2b5dd9-f8e6-4b67-8e25-585cbd802413%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel F. Moisset - UK Country Manager - Machinalis Limited
www.machinalis.co.uk <http://www.machinalis.com>
Skype: @dmoisset T: + 44 7398 827139

1 Fore St, London, EC2Y 9DT

Machinalis Limited is a company registered in England and Wales. Registered
number: 10574987.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CALuYSZWMMRo7gwFCkGmn4fSNNw5SrZ6uHN%3DW%3D07n%2B%2BRcTsyxiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to