Re: [FEATURE] Allow squashmigrations to squash the whole project

2020-04-29 Thread Javier Buzzi
How terrible would something like this be:

class AppConfig:
"""Class representing a Django application and its configuration."""

.

   @cached_property
def is_squashable(self):
if hasattr(self, 'squashable'):
return self.squashable
 code from isort

in your local apps.py you can chose to do:

class MyAppConfig(AppConfig):
squashable = False  # or omit it, if you want django to figure it out

This plays back into a requirement i had, where we have apps just for testing 
inside our application that we don't want squashed. We would also need to have 
a little more binding power from Migration to the AppConfig, since we would 
need to pick this value up. From my naive research, doesn't seem like an issue 
since Apps should always exist in order to make the migration anyway, i dont 
see a big risk in coupling the two.

What does everyone think?

Buzzi


> On Apr 28, 2020, at 8:33 PM, charettes  wrote:
> 
> You don't have to explicitly configure them as long as you run isort within a 
> Python environment that has all dependency installed properly. If you want to 
> run isort without installing all of the deps of your package you have to 
> explicitly specify which module is first or third party.
> 
> Here's the routine I was referring to 
> https://github.com/timothycrosley/isort/blob/0ee43b6a4f3c40876c3c7714846ecf8e584dc314/isort/finders.py#L165-L191
>  
> 
> 
> Simon
> 
> Le mardi 28 avril 2020 16:04:14 UTC-4, Markus Holtermann a écrit :
> But for isort one specifies the `known_first_party` and `known_third_party` 
> packages. https://github.com/timothycrosley/isort#configuring-isort 
>  
> 
> At least I was under the impression that that's the only way how it decides 
> where to place imports. 
> 
> Cheers, 
> 
> Markus 
> 
> On Tue, Apr 28, 2020, at 9:41 PM, charettes wrote: 
> > It's notoriously hard to distinguish between first-party and 
> > third-party apps but I know some package manage to do it relatively 
> > well (e.g. isort). 
> > 
> > Le mardi 28 avril 2020 14:32:13 UTC-4, Javier Buzzi a écrit : 
> > > To be kind to the user, absolutely! .. any idea on how to implement it 
> > > O:) 
> > > 
> > >> On Apr 28, 2020, at 2:29 PM, charettes > wrote: 
> > >> 
> > >> Don't we need to prevent that from happening anyway? I guess we'd want 
> > >> to prevent --crossapp=auth from working as well. 
> > >> 
> > >> Le mardi 28 avril 2020 13:50:54 UTC-4, Javier Buzzi a écrit : 
> > >>> To do that we need to know which apps are part of your project, and 
> > >>> which are not. Otherwise you'll be squashing "django.contrib.auth" as 
> > >>> an example, and you're not going to have a fun time at that.. 
> > >> 
> > >>  -- 
> > >>  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-d...@googlegroups.com <>. 
> > >>  To view this discussion on the web visit 
> > >> https://groups.google.com/d/msgid/django-developers/ca814e82-9258-40eb-afed-82edb0bc29c8%40googlegroups.com
> > >>  
> > >>  > >>  
> > >> >.
> > >>  
> > > 
> > 
> >  -- 
> >  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-d...@ <>googlegroups.com . 
> >  To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/django-developers/8af08a8f-4f4d-4fef-8daa-e3743a1f8468%40googlegroups.com
> >  
> > 
> >  
> >  >  
> > >.
> >  
> 
> -- 
> 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 
> 

Re: Fellow Reports -- April 2020

2020-04-29 Thread Carlton Gibson
Hi all. 



Calendar Week 17 -- ending 26 April.


Triaged:

https://code.djangoproject.com/ticket/31509 -- Enable faulthandler 
automatically during tests (Accepted)
https://code.djangoproject.com/ticket/31412 -- Database timing attack 
against sessions. (wontfix)
https://code.djangoproject.com/ticket/31504 -- Allow makemigrations to skip 
database consistency checks (Accepted)
https://code.djangoproject.com/ticket/31508 -- ASGI Lifespan Support 
(Accepted)
https://code.djangoproject.com/ticket/31501 -- Update Documentation for 
"Testing Responses" section on Django Documentation (wontfix)
https://code.djangoproject.com/ticket/31494 -- Allow test Client to re-use 
query string for non-GET requests when following 307/308 redirects. 
(Accepted)
https://code.djangoproject.com/ticket/31490 -- Increase length of 
contrib.sites domain field (needsinfo)
https://code.djangoproject.com/ticket/31488 -- Django Admin showing 
"Date input" for Time Field in Mobile Safari (worksforme)
https://code.djangoproject.com/ticket/31492 -- Changing field type can 
cause unrelated nullability change in field on Oracle. (Accepted)
https://code.djangoproject.com/ticket/22420 -- Postgresql connections not 
being dropped between tests? (needsinfo)
https://code.djangoproject.com/ticket/31482 -- The templatetags folder 
doesn't need to be a package. (wontfix)
https://code.djangoproject.com/ticket/31485 -- Update admin's jQuery 
to 3.5.X. (Accepted)



Reviewed:

https://github.com/django/django/pull/12392 -- Fixed #12990, Refs #27694 -- 
Added JSONField model field.
https://code.djangoproject.com/ticket/29249 -- Make serializers 
consistently unicode by default.
https://github.com/django/django/pull/12780 -- Fixed #31505 -- Doc'd 
possible email addresses enumeration in PasswordResetView.
https://github.com/django/django/pull/12753 -- Added link to Mozilla's 
infosec page on web security.
https://github.com/django/django/pull/12757 -- Fixed #31483 -- Remove admin 
change_form.js dependency on jQuery.
https://github.com/django/django/pull/12775 -- Added a section on NGINX 
Unit to WSGI docs.
https://github.com/django/django/pull/12773 -- Made compress.py script use 
the officially released google-closure-compiler.
https://github.com/django/django/pull/12770 -- Refs #29892 -- Fixed 
selenium test test_inline_formset_error_input_border on Firefox.
https://github.com/django/django/pull/12755 -- Used allowlist not whitelist 
and blocklist not blacklist.
https://code.djangoproject.com/ticket/27395 -- Allow generating 
'

Reference to GSoC proposal

2020-04-29 Thread Kacper Szmigiel
Hello guys!

Some of you may already know me, as I submitted a proposal for GSoC 2020. I 
just wanted to let you know that I'm doing well in terms of getting 
familiar with Django-Stubs . 
I've already managed to fix some bug (PR #351 
) and almost finished 
working on the other one (PR #354 
). I'm also getting a 
lot of great feedback from my desired mentor, Mr. Nikita Sobolev, and 
started to investigate Mypy docs in order to do my best if my proposal will 
get accepted. I hope it convinces you that I take GSoC seriously, and what 
I wrote in my proposal is in line with reality.

Kind regards,
Kacper

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0c5e4c90-2ea4-42af-9c6f-5bd1706b316b%40googlegroups.com.