Re: QuerySet.iterator together with prefetch_related because of chunk_size

2019-01-14 Thread Adam Johnson
> > ...what if we required chunk_size to be explicitly specified when the > queryset has prefetch lookups? This seems reasonable, but would you do in the case chunk_size isn't explicitly defined - throw an exception? Currently it silently fails to prefetch which means N + 1 queries, so even

Re: QuerySet.iterator together with prefetch_related because of chunk_size

2019-01-14 Thread charettes
> This seems reasonable, but would you do in the case chunk_size isn't explicitly defined - throw an exception? That's would be the plan. > Currently it silently fails to prefetch which means N + 1 queries, so even prefetching for the default chunk_size of 2000 would be a huge gain in cases

Re: QuerySet.iterator together with prefetch_related because of chunk_size

2019-01-14 Thread Adam Johnson
I agree with your reasoning, and also favour option 2 now, especially since the default can break on sqlite. It would also be possible to go through a deprecation period to first raise a warning and not prefetch, before a later version raises an exception, which is probably kinder since

Re: makemessages - Add an option to disable fuzzy translations?

2019-01-14 Thread אורי
Thank you, I created my own make_messages command: https://github.com/speedy-net/speedy-net/blob/staging/speedy/core/base/management/commands/make_messages.py אורי u...@speedy.net On Fri, Jan 11, 2019 at 10:10 AM Claude Paroz wrote: > Le vendredi 11 janvier 2019 07:46:04 UTC+1, Uri Even-Chen

Re: Request to reconsider ticket #27910: using an Enum class in model Field choices

2019-01-14 Thread raphael
I saw this thread so wanted to share a bit of a gotcha we had with enums internally for anyone trying to handle this stuff Internally, we have a wrapper around CharField to work with enums (we go further than just choices and actually have the values be enums), but there's unfortunately still