Re: naming of a new test client method for logging in

2015-06-30 Thread Andriy Sokolovskiy
force_login() seems to be more clear what it going on inside On 6/30/15 16:38, Tim Graham wrote: > There's a proposal [1] to add a new method to the test client that works > like login(), but skips the authentication (no credentials need to be > provided) and verification (is_active=False can logi

Re: should we close in-memory file-like objects (StringIO, BytesIO, etc.)?

2015-07-03 Thread Andriy Sokolovskiy
My vision of that was to have clean code (even if these are few bytes). Python allows to have memory leaks like this, without throwing warnings, but if we know that we can close it, I think we should do that. We're usually writing new tests by copying logic from sibling test (if new test need to d

Re: Renaming the postgresql_psycopg2 backend

2015-07-15 Thread Andriy Sokolovskiy
Good proposal. If there will be release of psycopg3, which will work without serious changes to django codebase, this old name can bring more confusion, so need to deprecate this. On 7/15/15 15:17, Baptiste Mispelon wrote: > Hi everyone, > > After starting a new project recently and failing three

Adding missing aggregate functions to contrib.postgres ?

2015-02-07 Thread Andriy Sokolovskiy (coldmind)
So, since django has contrib.postgres, maybe it would be reasonable to add postgres-specific aggregate functions to this module? If it is good idea, I'm gonna create ticket and implement this. -- You received this message because you are subscribed to the Google Groups "Django developers (Cont

Re: Adding missing aggregate functions to contrib.postgres ?

2015-02-07 Thread Andriy Sokolovskiy (coldmind)
d API contains > BaseDatabaseOperations.check_expression_support for this exact reason. Feel > free to create the ticket. > > Regards, > Michael Manfre > > On Sat, Feb 7, 2015 at 9:00 AM, Andriy Sokolovskiy (coldmind) < > soka...@yandex.ru > wrote: > >> So, since django has contrib.postgres, mayb

Re: Adding missing aggregate functions to contrib.postgres ?

2015-02-07 Thread Andriy Sokolovskiy (coldmind)
OK, since ticket was market as accepted, should *all* aggregates functions from http://www.postgresql.org/docs/9.4/static/functions-aggregate.html be implemented ? I'm asking to prevent doing unnecessary work. воскресенье, 8 февраля 2015 г., 1:11:08 UTC+2 пользователь Andriy Sokolo

Re: Adding missing aggregate functions to contrib.postgres ?

2015-02-09 Thread Andriy Sokolovskiy (coldmind)
r > versions should be relatively clean. > > Yours, > Russ Magee %-) > > On Sun, Feb 8, 2015 at 9:27 AM, Andriy Sokolovskiy (coldmind) < > soka...@yandex.ru > wrote: > >> OK, since ticket was market as accepted, should *all* aggregates >> functions from >

Re: Adding missing aggregate functions to contrib.postgres ?

2015-02-10 Thread Andriy Sokolovskiy (coldmind)
request. > > I'm not sure that you need to separate out "general" and "statistics" into > different modules, but that's something we can discuss on the PR. > > Nice work :) > > Josh > > On Tuesday, 10 February 2015 01:07:37 UTC+11, Andri

Possible security issue using request.read()

2015-04-05 Thread Andriy Sokolovskiy (coldmind)
(I discussed this issue before with Florian Apolloner in secur...@djangoproject.com, and we decided to open a thread here). Consider simple view: class MyView(View): def patch(self, request, *args, **kwargs): request.read() return HttpResponse('test') Next, consider requ

Deprecate internal syncdb in 1.9 ?

2015-06-03 Thread Andriy Sokolovskiy (coldmind)
After discussion with Markus Holtermann, we decided that we need to deprecate internal syncdb in 1.9 (https://github.com/django/django/blob/7c637a3aaec311269bf863c220bf894eebbe7c7c/django/core/management/commands/migrate.py#L136) The fact that apps without migrations are not supported, which is

Re: Proposal for a new key in settings.DATABASE dict

2015-06-22 Thread Andriy Sokolovskiy (coldmind)
I think due to https://github.com/django/django/blob/8047e3666b0b50bb04e6f16c2a4fb21ddfd5713f/django/db/backends/postgresql_psycopg2/base.py#L162 you can set application_name as the part of OPTIONS while configuration of your database, so it will be passed to psycopg2.connect. понедельник, 22

Re: Proposal for a new key in settings.DATABASE dict

2015-06-22 Thread Andriy Sokolovskiy (coldmind)
. понедельник, 22 июня 2015 г., 18:41:13 UTC+3 пользователь rodolphe.q...@people-doc.com написал: > > Thanks Andriy, I missed that, is this new in 1.8 ? > > Le lundi 22 juin 2015 17:06:46 UTC+2, Andriy Sokolovskiy (coldmind) a > écrit : >> >> I think due to >> http