Re: Bug in migrations when testing on Django 3.2b1

2021-03-19 Thread Hanne Moa
Reverting didn't see to do anything but I'll spread around some breakpoints
in 3.1 and 3.2 and compare what happens.

I have another project, on 3.0, that I'm testing with 3.2 with the exact
same naming scheme (except every app has a a label in their AppConfig, in
the one that fails, not all of them do) and this other project, everything
migrates just fine. The failing project started life before migrations
existed so there might be some not-upgraded cruft that is the cause.

On Thu, 18 Mar 2021 at 15:45, Carlton Gibson 
wrote:

> Looking at the history for the migrations code
> , the
> was
> https://github.com/django/django/commit/110001d0bbbabe2a5b57b14a59bd0e4b71bf2712#diff-e7df880bdc17c719e0332fa0cfbd4eff49bd481f638e34335a6311cfcd0ebc26
> recently which adjusted AppConfigStub, so maybe related.
> (You could see if reverting that helps.)
>
> On Thursday, 18 March 2021 at 15:39:04 UTC+1 Carlton Gibson wrote:
>
>> Hi.
>>
>> So, first off, thanks for testing!
>>
>> Initial thoughts:
>>
>> * We might need a bit more to be able to reproduce — are you able to
>> narrow down the problem?
>> * "Which migration it is varies between runs" — that sounds fun 😀
>> * "Changing AppConfig.name..." — The AppConfig loading was reworked, it
>> could be that:
>> https://docs.djangoproject.com/en/dev/releases/3.2/#automatic-appconfig-discovery
>>
>> Can I ask you to get as close as you can to directions for a reproduce
>> and open a ticket on Trac?
>> https://code.djangoproject.com/newticket
>>
>> If you can't get to a reproduce, it's still worth opening a ticket with
>> as much info as you can:
>>   * Maybe someone is able to say "Oh, it's this"
>>   * Provides info for anyone else hitting this.
>>
>> Thanks again!
>>
>> Kind Regards,
>>
>> Carlton
>>
>>
>> On Thursday, 18 March 2021 at 15:26:23 UTC+1 HM wrote:
>>
>>> Changing AppConfig.name to just "app" leads to ModuleNotFoundError: No
>>> module named 'app'.
>>>
>>> Changing the path in INSTALLED_APPS to "prefix.app.apps.AppConfig"
>>> instead leads to the same NodeNotFoundError as before.
>>>
>>> On Thu, 18 Mar 2021 at 15:06, Hanne Moa  wrote:
>>> >
>>> > I have some migrations that runs/tests fine on Django 3.0 and 3.1, but
>>> > not on 3.2b1.
>>> >
>>> > There's a specific app whose migrations fail with:
>>> >
>>> > django.db.migrations.exceptions.NodeNotFoundError: Migration
>>> > prefix_app.000N_fooFoo dependencies reference nonexistent parent node
>>> > ('app', '000M_bar').
>>> >
>>> > Which migration it is varies between runs, and note that the first app
>>> > label looks different than the second. Is there some new way to
>>> > auto-generate app labels that leads to this?
>>> >
>>> > In INSTALLED_APPS the app in question is by path: "prefix.app". In the
>>> > AppConfig, "name" is identical to the path, "prefix.app", while
>>> > "label" is "prefix_app". The models do not have an explicit tablename
>>> > set and in the database they have been created with
>>> > "app_modelnameinlowercase", not "prefix_app_modelnameinlowercase".
>>> >
>>> >
>>> > HM
>>>
>> --
> 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/4424f465-3643-4a39-ac9b-f52bacbe48a8n%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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CACQ%3DrrfKMjBQjzJfYNbUtTYaVtsBOGAeHxJRVgQFC19R%2BvS-rg%40mail.gmail.com.


Re: Bug in migrations when testing on Django 3.2b1

2021-03-19 Thread Hanne Moa
*phew* old cruft indeed. I wasn't using the AppConfigs I *thought* I
was using so no wonder things were flaky.

It might for paranoia's sake be worth mentioning in the upgrade notes
for 3.2 that if you get NodeNotFoundError when running
migrations/database tests on 3.2 to double check the app configs, and
the best way to do that is probably running
"django.apps.apps.app_configs.items()", and compare what the version
you're upgrading from says and what 3.2 returns.


On Fri, 19 Mar 2021 at 08:42, Hanne Moa  wrote:
>
> Reverting didn't see to do anything but I'll spread around some breakpoints 
> in 3.1 and 3.2 and compare what happens.
>
> I have another project, on 3.0, that I'm testing with 3.2 with the exact same 
> naming scheme (except every app has a a label in their AppConfig, in the one 
> that fails, not all of them do) and this other project, everything migrates 
> just fine. The failing project started life before migrations existed so 
> there might be some not-upgraded cruft that is the cause.
>
> On Thu, 18 Mar 2021 at 15:45, Carlton Gibson  wrote:
>>
>> Looking at the history for the migrations code, the was 
>> https://github.com/django/django/commit/110001d0bbbabe2a5b57b14a59bd0e4b71bf2712#diff-e7df880bdc17c719e0332fa0cfbd4eff49bd481f638e34335a6311cfcd0ebc26
>>  recently which adjusted AppConfigStub, so maybe related.
>> (You could see if reverting that helps.)
>>
>> On Thursday, 18 March 2021 at 15:39:04 UTC+1 Carlton Gibson wrote:
>>>
>>> Hi.
>>>
>>> So, first off, thanks for testing!
>>>
>>> Initial thoughts:
>>>
>>> * We might need a bit more to be able to reproduce — are you able to narrow 
>>> down the problem?
>>> * "Which migration it is varies between runs" — that sounds fun
>>> * "Changing AppConfig.name..." — The AppConfig loading was reworked, it 
>>> could be that:  
>>> https://docs.djangoproject.com/en/dev/releases/3.2/#automatic-appconfig-discovery
>>>
>>> Can I ask you to get as close as you can to directions for a reproduce and 
>>> open a ticket on Trac?
>>> https://code.djangoproject.com/newticket
>>>
>>> If you can't get to a reproduce, it's still worth opening a ticket with as 
>>> much info as you can:
>>>   * Maybe someone is able to say "Oh, it's this"
>>>   * Provides info for anyone else hitting this.
>>>
>>> Thanks again!
>>>
>>> Kind Regards,
>>>
>>> Carlton
>>>
>>>
>>> On Thursday, 18 March 2021 at 15:26:23 UTC+1 HM wrote:

 Changing AppConfig.name to just "app" leads to ModuleNotFoundError: No
 module named 'app'.

 Changing the path in INSTALLED_APPS to "prefix.app.apps.AppConfig"
 instead leads to the same NodeNotFoundError as before.

 On Thu, 18 Mar 2021 at 15:06, Hanne Moa  wrote:
 >
 > I have some migrations that runs/tests fine on Django 3.0 and 3.1, but
 > not on 3.2b1.
 >
 > There's a specific app whose migrations fail with:
 >
 > django.db.migrations.exceptions.NodeNotFoundError: Migration
 > prefix_app.000N_fooFoo dependencies reference nonexistent parent node
 > ('app', '000M_bar').
 >
 > Which migration it is varies between runs, and note that the first app
 > label looks different than the second. Is there some new way to
 > auto-generate app labels that leads to this?
 >
 > In INSTALLED_APPS the app in question is by path: "prefix.app". In the
 > AppConfig, "name" is identical to the path, "prefix.app", while
 > "label" is "prefix_app". The models do not have an explicit tablename
 > set and in the database they have been created with
 > "app_modelnameinlowercase", not "prefix_app_modelnameinlowercase".
 >
 >
 > HM
>>
>> --
>> 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/4424f465-3643-4a39-ac9b-f52bacbe48a8n%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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CACQ%3DrrdwtzQUeSLLCF1wFWYsUCORjK5%2BDzqXx5X-ixOZPM53zA%40mail.gmail.com.


Active Work on Generated Columns?

2021-03-19 Thread cheeri...@gmail.com
I came across this today:

https://code.djangoproject.com/ticket/31300

This is essential for my domain. I understand this is a big-ticket change 
but there is no good workaround for it.  One could use a Model method but 
this sticks everything into the application layer instead. If done directly 
in the DB, then it bypasses the ORM -- an even worse option here in my 
opinion.

So, Django devs, I'd like to ask two things. 1) Are there any plans to add 
support for Generated Columns in the near future, and 2) If you are a user 
who could benefit from this feature, what have you been doing in the 
meantime as an alternative?

Thank you,
Denis

-- 
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/ee04fc27-2400-48b3-bce4-506ec92d8e12n%40googlegroups.com.


Update - MSSQL support for Django

2021-03-19 Thread Warren Chu
Hi All, 

We've released the preview version 1.0b1 of the Microsoft SQL Server 3rd 
Party Backend for Django. This version supports Django 2.2, 3.0 and 3.1.

What's coming up next between now and GA release? We are re-adding optional 
regex support, so that the regex DLL file is downloadable from a trusted 
Microsoft downloads page. This file can then be installed in SQL Server via 
our project script. This follows our organizational security best practices.

If you have any questions, feel free to post here in the Django Developer 
forum, or via Github issues at: https://github.com/microsoft/mssql-django

Thanks,
Warren

-- 
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/93188f91-c638-4e4d-89ee-e4b63585ab38n%40googlegroups.com.