Re: PEP 484 type hinting in Django

2018-12-02 Thread Maxim Kurnikov
I'm working on stubs / mypy plugin for Django here
https://github.com/mkurnikov/django-stubs
I'm going to release an alpha version sometime around New Year's. I've 
integrated machinalis version of stubs. There's also generated stubs from 
Monkeytype execution over the django testsuite in the repository, I'm 
moving those to the main directory little by little. 

Still emits a lot of false positives though. Also, I test it on an internal 
project with python3.7/django2.1, don't know about other versions. 

With PEP561 there could be only one stubs package in PyPI (named 
"django-stubs"), so I'm postponing release till it'll be as useful as 
possible. I want to know core devs opinion too, whether it's safe to 
release or not.

On Tuesday, November 27, 2018 at 3:38:13 PM UTC+3, 李海珍 wrote:
>
> Wow, time fly. I had taken part in the promotion activity 2 years ago.
> while haven't seen any progress on this topic.
> Is there on any progress on this topic?
>
> 在 2016年8月17日星期三 UTC+8下午12:08:48,Alex Hill写道:
>>
>> Hi all,
>>
>> I like the plan to include PEP 484 type hinting in Django, outlined in 
>> the PyCharm promotion blog post. [1]
>>
>> Has this proposal been fleshed out much? Is there any extra information 
>> available anywhere that I've missed? I think this will be great for Django, 
>> and I'd happily contribute to the effort.
>>
>> Cheers,
>> Alex
>>
>> [1] 
>> https://www.djangoproject.com/weblog/2016/jun/30/pycharm-and-django-fundraiser/
>>
>

-- 
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/70317820-5008-42c8-a8eb-15b8b548547e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TestCase.setUpTestData in-memory data isolation.

2018-12-02 Thread Tobias McNulty
On Fri, Nov 30, 2018, 1:03 PM Adam Johnson  Tobias - using database updates isn't always viable. Also the system under
> test might need to take in the model instance, mutate it and execute its
> own save(), and then there's no way of rolling that back if the object
> wasn't deepcopy'd
>

Fair enough, but for those cases, one could just as easily deepcopy the
object in the test itself. Again, it's more explicit, gives the developer
control over exactly what they want to happen, and makes failures more
obvious.

I suppose if the API allowed one to mix and match approaches for different
tests and model objects (like Simon's testdata app does right now), that
would work, too.

Tobias

-- 
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/CAMGFDKQPcL_xEY5J-jGXj5BfzD2fCO8MsEgZoH9cmx4OMAqDHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.