Re: Discussing improvements of django.setup()

2019-08-06 Thread Pkl
Hello, any news about this issue? Concerning the thread-safety of setup(), the PR is here - https://github.com/django/django/pull/11440 Concerning the tweakability of setup(), I don't get your argument Aymeric: "*One more or one less monkey patch isn't going to make a difference to these pro

Re: Discussing improvements of django.setup()

2019-07-05 Thread Pkl
hello, AppConfig could provide hooks, but it'd indeed be already quite late in the setup process : settings are already loaded, logging already configured, script prefix already set, and just accessing AppConfig could already trigger the import of advanced submodules (models etc.), which could

Re: Discussing improvements of django.setup()

2019-07-02 Thread Christian González
Am 01.07.19 um 23:24 schrieb Pkl: > > Regarding django.setup() tweakability, the generic need is simply to > have a hook, somewhere for users to put early init code, regardless of > the way django is launched. Code that needs to execute this early are > mostly (if not all) monkey-patching the envi

Re: Discussing improvements of django.setup()

2019-07-01 Thread Pkl
Hello Aymeric, regarding django.setup() idempotence I continued discussion in the PR. Regarding django.setup() tweakability, the generic need is simply to have a hook, somewhere for users to put early init code, regardless of the way django is launched. Code that needs to execute this early are

Re: Discussing improvements of django.setup()

2019-06-30 Thread Aymeric Augustin
Hello Pakal, Making django.setup() idempotent In https://code.djangoproject.com/ticket/28752 , you say: > I've been bitten numerous times by the impredictable behaviour of django when > django.setup() was called numerous times. > In the old days I h

Discussing improvements of django.setup()

2019-06-27 Thread Pkl
Hello everyone, I'm bringing here, for broader review and discussion, the subject of making django setup more "tweakable": https://code.djangoproject.com/ticket/30536 https://github.com/django/django/pull/11435 There is indeed a need for doing pre/post operations at that crucial moment of the f