Re: DjangoCon US sprints communication (IRC is blocked)

2016-07-19 Thread Shai Berger
On Tuesday 19 July 2016 21:50:16 Tim Graham wrote: > Many ports are blocked on the conference network, including 6667 for IRC. > Does anyone have a preference about whether to use a slack channel or to > stick with #django-sprint on IRC and recommend something like IRCCloud to > bypass the firewall

Re: Translatable Site.name

2016-07-19 Thread Shai Berger
On Wednesday 20 July 2016 01:43:05 James Pic wrote: > Hi all, > > Are there any plans to make Site.name translatable ? > Site.name is a model field. Translatable models are a big hairy issue. Several solutions have been suggested, each with its own pros and cons. Last time I looked (several ye

Re: Improve queries on django admin

2016-07-22 Thread Shai Berger
I tend to agree with Tim -- in particular, a query on the admin should only return a small (<100) number of records, due to paging; if, for that size of query, you see a significant difference between returning all the columns and returning just the ones you need, it is suspicious: Either you ha

Re: Extend support for long surnames in Django Auth

2016-07-31 Thread Shai Berger
On Sunday 31 July 2016 00:15:57 Donald Stufft wrote: > > On Jul 30, 2016, at 4:40 PM, Aymeric Augustin > > wrote: > > > > I have trouble believing that a significant number of people are used to > > typing 100+ characters when inputting their name into a website — let > > alone that a significant

Re: Extend support for long surnames in Django Auth

2016-08-02 Thread Shai Berger
Well, there's one precedent that is quite pertinent here, and that is AUTH_USER_MODEL. But a setting for the length of a field in a built-in app is problematic because it would imply a migration in that app, rather than user apps. In principle we could write the d.c.auth migration by hand to t

Re: Simulating timeouts on client with django.test.client.Client

2016-08-23 Thread Shai Berger
Hi, Just to make it clear: Based on the ticket, you want to test how the server acts when facing client timeouts and/or disconnects. Please correct me if I'm wrong. Assuming I'm right, the test client seems like the wrong tool for this job, because it doesn't actually make network connections;

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread Shai Berger
On Wednesday 24 August 2016 14:33:34 Александр Христюхин wrote: > Actually network is not an issue here. I'm using locks in distributed cache > to manage requests between backends and that's what I want to test. In this > case calling Django directly is okay. > I am sorry, then; it seems I have m

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread Shai Berger
ach request, response will be the > same. > > I do realise, that this can be accomplished by just firing up "manage.py > runserver" and sending requests as real load balancer would do, but I > think it's too much overhead for a simple test. > > By "prot

Re: Django Box - A vagrant virtual machine for testing Django

2016-08-28 Thread Shai Berger
Hi Josh, This looks very promising. Thanks for making it. On Sunday 28 August 2016 08:55:05 Josh Smeaton wrote: > > *1. Should we host the django-box project under the django organisation?* > > [...] Should this project be proposed for inclusion within the django > organisation under DEP7 > htt

Re: Django default PK type setting

2016-08-31 Thread Shai Berger
On Thursday 01 September 2016 02:51:54 Josh Smeaton wrote: > A major issue with this would be the many apps out in the wild (and their > tests!) that assume the pk is an integer, and do queries like > .filter(pk=1). FWIW, this is a bad practice which we should recommend against. In databases whic

Re: is_valid as property

2016-09-29 Thread Shai Berger
Hi Sven, On Thursday 29 September 2016 22:09:27 Sven R. Kunze wrote: > > Am Donnerstag, 29. September 2016 20:26:54 UTC+2 schrieb Aymeric Augustin: > > > Generally speaking, properties are expected to be cheap and methods can be > > expensive. In my opinion, for lack of a better guideline, we sh

Re: disclosing security release dates on django-announce

2016-10-08 Thread Shai Berger
On Friday 07 October 2016 19:47:38 Markus Holtermann wrote: > On Friday, October 7, 2016 at 4:58:00 PM UTC+2, Tim Graham wrote: > > The Django team proposes [0] to add the following to the security policy: > > > > Approximately one week before public disclosure, ... > > we notify django-announce [

A command to optimize a squashed migration?

2016-10-31 Thread Shai Berger
Hi, I'm doing some migration squashing, which was long overdue; so, I'm squashing dozens of migrations at once. Within these migrations, there are data migrations (RunPython operations) which, of course, stand as barriers to optimization. The operations have not been defined elidable -- because

Re: Rethinking migrations

2016-11-05 Thread Shai Berger
Hi, On Saturday 05 November 2016 17:53:49 Patryk Zawadzki wrote: > > I'm typing this from the comfort of Django: Under the Hood sprints so > please excuse poor grammar and the somewhat chaotic explanations that > follow. I'm very tired and English is not my mother tongue. This is not a > DEP but

Re: RFC: DEP 7 - dependency policy

2016-11-12 Thread Shai Berger
Hi all, I just had a look, and noted, On Saturday 05 November 2016 14:23:43 Jacob Kaplan-Moss wrote: > > DEP 7 proposes a new dependency policy. In a nutshell, the policy is: > Python packaging is good now. Django can have dependancies. > Actually, we have an already accepted DEP 7. It deals w

Re: drop compatibility with Python < 2.7.8?

2016-11-15 Thread Shai Berger
I would too, since the distros tend to patch the older Python versions without updating the version number (2.7.8-12 etc). On Tuesday 15 November 2016 11:01:42 Marc Tamlyn wrote: > I'd be inclined to agree with Claude. > > On 15 November 2016 at 07:20, Claude Paroz wrote: > > I wouldn't spend t

Re: Provide a simpler way to default runserver IP/port to 0.0.0.0:8000

2016-11-28 Thread Shai Berger
On Monday 28 November 2016 15:48:21 emor...@mozilla.com wrote: > This was filed as https://code.djangoproject.com/ticket/27537 , but moving > here for discussion. > It seems all you need in the overridden runserver is: from (...)runserver import Command as BaseCommand class Command(BaseCommand):

Re: Window expressions, #26608

2016-11-29 Thread Shai Berger
On Wednesday 30 November 2016 03:10:23 Michael Manfre wrote: > > On 29 November 2016 at 22:04, Josh Smeaton > > wrote: > > > Mads, there's nothing that currently handles a list of expressions, and > > certainly nothing specific to OrderBy. Your proposed syntax is basically > > what would be requi

Re: two-phase commit / distributed transaction

2016-12-01 Thread Shai Berger
On Thursday 01 December 2016 13:52:41 Aymeric Augustin wrote: > > I’m proposing a separate context manager because I’m worried about > increasing again the complexity of transaction.atomic. There will be a > significant amount of duplication between the two implementations, though. > I believe th

Re: Considering removing support for ("iLmsu") regex groups in URLpatterns. Do you use them?

2016-12-20 Thread Shai Berger
I think part of Sjoerd's point was that current implementation also means that including the flag in a child affects parents -- but only with regard to said child. So, if you have url('a/', include("b")) and in b: url('b/$', blah), url('c/$', bleh, flags=re.I), then the valid urls include a

Re: is support for old cx_Oracle versions needed?

2016-12-22 Thread Shai Berger
On Thursday 22 December 2016 00:07:05 Josh Smeaton wrote: > I don't think licensing allows OS maintainers to package up cx_Oracle and > its dependencies, so I'd like to hear from others if this is a thing. > I checked and cx_Oracle does not seem to be packaged in Debian (at least not in its free

Re: Provide a simpler way to default runserver IP/port to 0.0.0.0:8000

2017-01-16 Thread Shai Berger
I am -1 on adding a setting to handle a use-case that can be handled by users with a 6-line file: On Monday 28 November 2016 16:05:39 Shai Berger wrote: > > It seems all you need in the overridden runserver is: > > from (...)runserver import Command as BaseCommand >

Re: Removing and renaming Django's Python 2 related helpers

2017-01-21 Thread Shai Berger
On Saturday 21 January 2017 22:55:51 Tim Graham wrote: > > I'm advocating to remove the undocumented things in Django 3.0 (released > Dec. 2019) or later without a deprecation. By that time, I hope third-party > apps won't support Python 2 either and so part of adding Django 3.0 > compatibility wi

Re-open ticket 25192

2017-01-28 Thread Shai Berger
Hello, Ticket #25192[1] is about a problem that only affects Python 2 users: If you write a migration with a `RunPython` operation, and you use the documented `RunPython.noop` as the reverse action (or forward action, but that is much less likely...), then all looks well, until you try to squas

Re: Django 1.11 indexes

2017-01-29 Thread Shai Berger
On Sunday 29 January 2017 11:41:39 Adam Johnson wrote: > On 28 January 2017 at 21:45, Vitaliy Kucherivaiy > wrote: > > > > Do I understand this correctly - now there are 2 ways to make a single > > field indexed in database: > > - FieldClass(db_index=True) > > - Model.Meta.indexes > > > > will

Re: Replacing the contrib.sites Site model with a setting?

2017-01-30 Thread Shai Berger
On Sunday 29 January 2017 22:54:12 Proxy wrote: > > Actually django.contrib.settings needs to be SWAPPABLE. Then it will > receive +100. (Oooohh... Someone already proposed this. Even with code > sample -> https://code.djangoproject.com/ticket/22779. 3 years ago and > ticket still open... How typi

Re: standardised approach for packaged apps to define default settings

2017-02-01 Thread Shai Berger
Hi Anthony, Two points: 1) 1.11 is feature frozen, nothing like a new subframework is likely to be accepted to it. 2) The ticket is actually a dupe of an ancient ticket[1]. In that ticket, you can see my own take of the subject, of several years ago. In the years since then, I haven't felt an

Re: Is it possible to Atomically check limit and Increment/decrement a counter field in multiple tables ?

2017-02-14 Thread Shai Berger
Hi Sarvi, This list is intended for discussions about developing Django itself; your question is about writing code using Django, and belongs to the django-users. That said, please look up database transactions and database locks, and the relevant Django APIs -- transaction.atomic() and queryse

Re: Template handling of undefined variables

2017-02-27 Thread Shai Berger
On Sunday 26 February 2017 11:16:54 Florian Apolloner wrote: > As much as I'd like variables to raise an error if they cannot resolve, I > am with Karen here -- the backwards compatibility considerations should > take priority here. At least we should have a possibility in the templates > to check

Re: Database connection retry

2017-03-05 Thread Shai Berger
On Sunday 05 March 2017 12:32:34 James Pic wrote: > > However, perhaps runserver could just exit if checks don't pass, which > makes sense I think, allowing the optional use of a shell loop. I'd prefer > that, what do you think is better, exit or retry ? ... then you can do that yourself already

assertRaises vs. assertRaisesMessage

2017-04-07 Thread Shai Berger
Hello all, A recent PR[1] seeks to replace most of the assertRaises() calls in the test- suite with assertRaisesMessage(). The argument for it is that it then becomes easier to find the test for some error handling, by grepping the test for the message text. Also, in some cases, an existing asse

Re: assertRaises vs. assertRaisesMessage

2017-04-07 Thread Shai Berger
Hi Tim, > Without testing for a message, there's also a possibility that the > exception you think you're testing isn't the one the test is actually > raising. If you need to verify the error message for that reason, then the exception is probably not specific enough. Testing the message, in th

Database "execute hooks" for instrumentation

2017-04-07 Thread Shai Berger
Hello, This is an idea that came up during the djangocon-europe conference: Add the ability to install general instrumentation hooks around the database "execute" and "executemany" calls. Such hooks would allow all sorts of interesting features. For one, they could replace the current special-

Re: Making __repr__ safe by default

2017-04-07 Thread Shai Berger
On Friday 07 April 2017 15:35:55 Adam Johnson wrote: > Patryk, when you say 'revisit', do you have links to the original > discussion/tickets? He was replying to a thread from 2013. You should have the link at the bottom of every message. > > I also agree that __repr__ shouldn't be able to trig

Re: Database "execute hooks" for instrumentation

2017-04-07 Thread Shai Berger
On Friday 07 April 2017 17:47:51 Carl Meyer wrote: > Hi Shai, > > On 04/07/2017 06:02 AM, Shai Berger wrote: > > This is an idea that came up during the djangocon-europe conference: Add > > the ability to install general instrumentation hooks around the database > >

Re: [Feature Request] Let manage.py ignore migration dependencies

2017-04-13 Thread Shai Berger
Hi, On Thursday 13 April 2017 18:18:57 Brock Hallenbeck wrote: > > Due to these duplicate tables, my process of setting up an app database is > as follows: > > 1.Create database on server / point django at it / set up router > 2. migrate --database=app_db > 3. Delete all the duplicate auth_* an

Re: can_introspect_default feature

2017-04-25 Thread Shai Berger
Hi Maxi, On Tuesday 25 April 2017 20:21:47 Maximiliano Robaina wrote: > Hi, > > Sorry but a need to return to this > > El jueves, 20 de octubre de 2016, 9:53:23 (UTC-3), Tim Graham escribió: > > The 'default' model field option is used in Python rather than in the > > database. SchemaEditor migh

Re: Easier way to populate test databases for parallel tests (patch in github)

2017-04-29 Thread Shai Berger
On Saturday 29 April 2017 03:50:16 Tim Graham wrote: > I would expect test data population to happen using migrations rather than > in the test runner. Can you elaborate on your use case and say if that > method would be unsuitable? > Apparently, many people think that migrations are the wrong to

Re: Pre-DEP: Meta.without_primary_key (related to CompositeFields)

2017-05-23 Thread Shai Berger
Hi, Thank you for making this suggestion. It is my guess that allowing pk-less models will place quite a burden on many parts of Django, which assume a PK exists. There may also be other solutions to the problem you raise -- e.g. changing the legacy table to add a PK, perhaps while providing a

Re: assertRaises vs. assertRaisesMessage

2017-05-25 Thread Shai Berger
Hi, I apologize for re-raising a thread that's mostly done and decided, but I just ran into [1] where it says: """ Note Exception messages are not part of the Python API. Their contents may change from one version of Python to the next without warning and should not be relied on by code which

Re: Integrate dj-database-url into Django

2017-05-29 Thread Shai Berger
If I understand things correctly, registration of new url-schemas to enable something like dj-database-url to support 3rd parties should be a trivial matter; just add an entry to some dictionary, with the schema as key, and the dotted-path of the backend as value. IMO, scanning INSTALLED_APPS,

Re: should nonexistent template filter arguments resolve to string_if_invalid rather than raise VariableDoesNotExist?

2017-06-01 Thread Shai Berger
I favor raising an exception in this case, because values in this context are not coerced to strings (unlike the case in {{ }} references). IMO, and in order to protect the writers of all 3rd-party filters, the only way to solve this without raising an exception is to resolve the whole filter e

Re: should nonexistent template filter arguments resolve to string_if_invalid rather than raise VariableDoesNotExist?

2017-06-03 Thread Shai Berger
On Friday 02 June 2017 18:38:47 Vlastimil Zíma wrote: > > Shai: Values are sometimes turned into an empty string in case of > UnicodeDecodeError, see > https://github.com/django/django/blob/master/django/template/base.py#L994-L > 998 > That code is within a render() method -- a place where the v

Re: should nonexistent template filter arguments resolve to string_if_invalid rather than raise VariableDoesNotExist?

2017-06-24 Thread Shai Berger
On Friday 23 June 2017 19:01:21 allejjandr...@gmail.com wrote: > IMHO I think it's more consistent with the definition of certain filters > make the system somehow "lazy" and only evaluate filter variables only when > are used. > Like everything else, it's a tradeoff: Making conditional filters "

Re: GSOC2025

2024-11-03 Thread Shai Berger
Hi pavanMudavath, You can join a Discord server at https://discord.gg/T8w8fjbh but the canonical place for discussion these days is the forum https://forum.djangoproject.com/ you probably want to start at the "Mentorship" category https://forum.djangoproject.com/c/internals/mentorship/10 Hope thi

<    2   3   4   5   6   7