Re: Proposal: Clarify the ENV var that controls the autoreloader so AppConfig's ready() can be have a guard.

2022-10-18 Thread Steffan Pease
Hi Adam, This isn't so much a tech support question- I don't have a specific personal issue I'm trying to solve with this suggestion, it's more that I feel like this part of django works in a counter-intuitive way (best exemplified that the Django documentation includes various warnings about

Re: Proposal: Clarify the ENV var that controls the autoreloader so AppConfig's ready() can be have a guard.

2022-10-18 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Steffan Your question suffers from the ”X/Y problem”. You’re asking whether to change Django to make Y easy, without explaining the X you’re trying to achieve. *Why* do you want to know if you're in the runserver main process? Also, it may work to check the running command from sys.argv (

Re: general interest in faster bulk_update implementation

2022-10-18 Thread Jörg Breitbart
Will there *not* be a Django ORM implementation of psycopg3 COPY FROM when that lands? And, I guess I'll need to figure out when that lands/would land. Not automagically, since the ORM does not use COPY internally. The main ORM parts are pretty generic, thus mostly based on ANSI compliant SQL

Re: general interest in faster bulk_update implementation

2022-10-18 Thread jobe...@gmail.com
Will there *not* be a Django ORM implementation of psycopg3 COPY FROM when that lands? And, I guess I'll need to figure out when that lands/would land. On Tuesday, October 18, 2022 at 11:07:51 AM UTC-4 j.bre...@netzkolchose.de wrote: > > pretty quickly, so if you need testing input (Django

Re: general interest in faster bulk_update implementation

2022-10-18 Thread Jörg Breitbart
> pretty quickly, so if you need testing input (Django 3.2, Postgres) I > can offer feedback from what I find. Yes testing would be awesome, esp. for edge cases (test coverage for default cases is pretty complete for `fast_update` I think). > Can you tell me more about this statement: > >

Re: general interest in faster bulk_update implementation

2022-10-18 Thread jobe...@gmail.com
Jerch, I love that you're improving the `bulk_update` performance with your package. I am definitely looking to adopt it. I can start working on it pretty quickly, so if you need testing input (Django 3.2, Postgres) I can offer feedback from what I find. Can you tell me more about this

Re: Proposal to add a flatten() to django.utils

2022-10-18 Thread David Sanders
> > +1 for that, though this will need some careful design between perf optimizations and how much general purpose it should be. Perhaps before optimising we could start out with the basic readable version and tailor it moving forward. It's possible this could be irrelevant if it's only ever