Re: Methodology for increasing the number of PBKDF2 iterations

2017-01-09 Thread Alex Gaynor
That's a correct assumption -- you won't be able to use pip without OpenSSL. Alex On Mon, Jan 9, 2017 at 7:39 PM, Tim Graham wrote: > About "we cannot just assume that all Python 3 installs have a "fast" > PBKDF2 implementation" -- I'd expect very few if any Django users to be > compiling their

Re: Methodology for increasing the number of PBKDF2 iterations

2017-01-04 Thread Alex Gaynor
If anyone is curious about the breakdown of versions, I used the following query: SELECT REGEXP_EXTRACT(details.python, r"^([^\.]+\.[^\.]+\.[^\.]+)") as python_version, COUNT(*) as download_count, FROM TABLE_DATE_RANGE( [the-psf:pypi.downloads], DATE_ADD(CURRENT_TIMESTAMP(), -2, "wee

Re: Methodology for increasing the number of PBKDF2 iterations

2017-01-04 Thread Alex Gaynor
can > toss in an older Python 2.7 as well if necessary or desired to see the > slower implementation. But I think this shows that there's a near enough > negligible speed difference in recent Python versions. Aside from perhaps a > very slight speedup in 3.6. > > -Joey Wilhelm

Re: Page not found (404) passing two variables through URL django

2016-12-17 Thread Alex Gaynor
This list is for the development of Django, not development with Django. Please use the django-users mailing list. That said, the problem is that you have an extra "<" after the "(" in the amount capture. Alex On Fri, Dec 16, 2016 at 6:38 AM, Ravin Kohli wrote: > > this is the actual url > > h

Re: disclosing security release dates on django-announce

2016-10-10 Thread Alex Gaynor
We already have one :-), our bounty indicates several severity levels: https://hackerone.com/django Alex On Mon, Oct 10, 2016 at 3:40 PM, Tim Graham wrote: > Providing an indication of severity would be fine with me. Does anyone > know of other web frameworks that have descriptions of severity

Re: Should the Django session-id be hashed?

2016-09-22 Thread Alex Gaynor
If Django were a different framework, I'd probably think this was a reasonable idea. However, Django's ORM is _incredibly_ good at deterring SQL injection. In many many years of using and reviewing Django applications, SQL injection is vanishingly rare in my experience; therefore I think this adds

Re: Sonar for the Django rpoject

2016-09-05 Thread Alex Gaynor
If these are what qualifies as critical, I don't think this is a good use of our time. Alex On Wed, Aug 31, 2016 at 1:50 PM, Ivan Sevastoyanov < ivan.sevastoya...@gmail.com> wrote: > >

Re: Add an optional dependency on python-fastpbkdf2

2016-08-20 Thread Alex Gaynor
AFAIK upstream Python does use an optimized PBKDF2 (and OpenSSL 1.1.0 also has it). Alex On Sat, Aug 20, 2016 at 4:02 PM, Florian Apolloner wrote: > Ups, just realized that we use pbldf2 for more than just password hashing > -- if that where not the case the multi-library approach like the bcry

Re: Methodology for increasing the number of PBKDF2 iterations

2015-09-22 Thread Alex Gaynor
Sure, but such a problem has nothing to do with password upgrades, it can already be triggered by registration, or even just logging in without a password upgrade. Alex On Tue, Sep 22, 2015 at 2:43 PM, Tim Graham wrote: > Sorry, I explained poorly. We do upgrade passwords when the iteration > c

Re: Methodology for increasing the number of PBKDF2 iterations

2015-09-20 Thread Alex Gaynor
Unfortunately here is where we hit an asymmetry: single threaded performance of PBKDF2 _as realized in our pure Python implementation_ indeed does not improve by 25% every 8 months. Unfortunately 24k iterations is behind where we'd want to be (~100k iterations, or a factor of 4, last I checked).

Re: Add DoNotTrack (DNT) middleware?

2015-08-29 Thread Alex Gaynor
I would say no: this does _so_ little, and it's completely implementable outside of Django. Moreover, adding the middleware doesn't change any behavior, you still have to do a bunch of work in your app to actually implement the not-tracking logic. Alex On Sat, Aug 29, 2015 at 1:17 PM, Tim Graham

Re: SSL support for Django-admin runserver‏

2015-05-11 Thread Alex Gaynor
I don't have a strongly held opinion on whether Django should include this, but if it's going to, it should include a *well configured* TLS server, utilizing modern TLS cipher suites, TLS versions, etc. We shouldn't be yet another part of the "well, it's not *my* job to configure OpenSSL correctly"

Re: DKIM signing option for stmp.MailBackend?

2015-04-04 Thread Alex Gaynor
I agree that DKIM is the responsibility of an MTA, not Django. Alex On Sat, Apr 4, 2015 at 6:53 AM, Bruno Ribeiro da Silva < bruno.dev...@gmail.com> wrote: > I do think DKIM is a task for the MTA too, so it doesn't make much sense > to have it in django's core. > On Apr 4, 2015 6:27 AM, "Claude

Re: ANN: Django website redesign launched

2014-12-16 Thread Alex Gaynor
Hi Christian, While I'm sure you didn't mean it this way, your email frankly makes you sound like an jerk, and that tone is not appropriate for this list. You've not substantiated any of your claims, other than that it your personal preference. If you'd like to make specific, *actionable* sugges

Re: Websockets... again

2014-10-29 Thread Alex Gaynor
And after you throw away the ORM, you have to throw away every other library that does blocking IO (anything in the stdlib, memcached, redis, requests, etc.). There are absolutely no affordances in WSGI for use with non-blocking libraries like asyncio or Twisted. Alex On Wed Oct 29 2014 at 1:45:5

Re: #23646 Enhancement: Updating multiple values in a single sql update using Django ORM

2014-10-19 Thread Alex Gaynor
No, it doesn't. The atomicity semantics of update() are impossible to implement without it, this isn't the case for a multi-object UPDATE as far as I can tell. Alex On Sun, Oct 19, 2014 at 11:34 PM, Anshuman Aggarwal < anshuman.aggar...@gmail.com> wrote: > Thanks for the input Javier. Wouldn't a

Re: RFC: "UPSERT" in PostgreSQL

2014-09-27 Thread Alex Gaynor
Hi Peter, Thanks for reaching out about this! On Sat, Sep 27, 2014 at 7:01 PM, Peter Geoghegan wrote: > Hello, > > I am a PostgreSQL major contributor, currently undertaking development > of a feature sometimes called "UPSERT" for PostgreSQL. > > Jacob Kaplan-Moss is an acquaintance and co-work

Re: Two proposals for the Django Code of Conduct.

2014-09-09 Thread Alex Gaynor
When Jacob and I originally drafted the CoC, we specifically included an enumeration of some disallowed behaviors on the recommendation of the Ada Initiative -- it was their view that the list helped to minimize rules lawyering, whereby someone attempts to explain how they could not have known thei

Re: Requiring GitHub login for actions on Trac

2014-08-06 Thread Alex Gaynor
+1 for Github. Here's why: You're all focused on existing users. For new users, being able to reuse existing authentication credentials is a considerable step up, I regularly give up on filing bug reports against other OSS projects because I'm frankly too tired to register for yet-another-JIRA-ins

Re: Supporting and using EOL'd software (was Re: Time to drop support for Oracle < 11?)

2014-06-14 Thread Alex Gaynor
On Sat, Jun 14, 2014 at 5:49 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Sun, Jun 15, 2014 at 7:51 AM, Shai Berger wrote: > >> Hi guys, >> >> TL;DR -- ...sorry, there's no TL;DR here. It's a bunch of separate ideas. >> It's >> a little lengthy. Please bear with me. >> >> I'd

Re: Solving the select+1 problem.

2014-06-11 Thread Alex Gaynor
I also do not really know Haskell (I'm sensing a trend...), that said, it seems to me the cool part of haxl is that it can be automatic -- analagous to if writing {{ post.author.name }} in a template caused select_related("author") to automatically be applied to the queryset that yielded post. Ale

Re: Terms for database replication

2014-06-05 Thread Alex Gaynor
You're entitled to your own opinions, but you aren't entitled to your own facts. The terms primary/replica are extremely well established, perhaps even moreso than master/slave: https://imgur.com/a/pCp3d, the suggestion that this is a gross violation of computer science nomenclature is pure fiction

Re: Terms for database replication

2014-06-05 Thread Alex Gaynor
Hi everybody. The Django core developers have made our decision on the terminology we're going to use; I'd ask that you stop using django-developers to debate this further. Alex On Thu, Jun 5, 2014 at 10:43 AM, Unai Zalakain wrote: > Greetings! > > > I saw that someone suggested "leader" and

Re: "Master/slave terminology"

2014-05-27 Thread Alex Gaynor
On Tue, May 27, 2014 at 12:14 PM, Meira wrote: > I think it makes more sense to count reasonable arguments of both sides, > not the people who thumb up in the comments (by the way, those who thumb up > are mostly Americans, isn't that discrimination?) > If using the word "slave" is immediately as

Re: "Master/slave terminology" (was: Master/slave trolling pull request accepted to django master branch)

2014-05-27 Thread Alex Gaynor
On Tue, May 27, 2014 at 10:38 AM, Meira wrote: > This second commit was discussed in a Trac ticket and everyone (even you!) >> was welcome to give their opinion. >> > > That's all nice and good, but why is the discussion taking the course of > whether or not we're accepting the second commit? It

Re: DEPs: Django Enhancement Proposals

2014-04-14 Thread Alex Gaynor
The same way we do now? On Mon, Apr 14, 2014 at 3:34 PM, Andrew Farrell wrote: > Who is responsible then for deciding what the conclusion of the discussion > was? If there is no such person, how does the process handle the case when > people talk past each other and don't actually come to a conc

Re: DEPs: Django Enhancement Proposals

2014-04-14 Thread Alex Gaynor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 For us, I think the value of a DEP is in putting the conclusion of a discussion in one place, rather than forcing everyone to read the entire thread to know how it went. To that end, I don't think anything needs to change about how we accept DEPs. A

Re: Support byte range requests in django.views.static.serve

2014-04-13 Thread Alex Gaynor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I'd be +1 on doing this -- I know we've always said that Django's static serve isn't for production use, but as video and audio are increasingly common on the web, Django should support them seemlessly. Alex PS: I'm of course open to other ways of

Re: Using namedtuple instead of pure tuples

2014-02-23 Thread Alex Gaynor
FWIW these benchmaks are not measuring accurately. Creating a tuple of the form "(1, 2, 3)" (notably, where all the members are literal constants) takes NO time actually, since it's an immutable container of all immutable items, the compiler is able to factor the work out. A benchmark, even as idio

Re: Accelerated deprecation of fix_ampersands and clean_html

2014-02-23 Thread Alex Gaynor
For what it's worth, source graph is unable to find any callers of clean_html in OSS code (maybe github only?) either: https://sourcegraph.com/github.com/django/django/symbols/python/django/utils/html/clean_html Alex On Sun, Feb 23, 2014 at 2:15 PM, Erik Romijn wrote: > Dear all, > > I would l

Re: mod_python support

2013-11-25 Thread Alex Gaynor
I'm -1 on this. If it's, in fact, just a normal WSGI container, we should add docs for it if it has any uptake, as we would for any other WSGI container, and I don't believe it has any uptake. Alex On Mon, Nov 25, 2013 at 10:36 AM, Kamil Gałuszka wrote: > Hi ! > > I wanted to post this in old t

Re: #18659 -- Deprecating request.REQUEST

2013-10-16 Thread Alex Gaynor
Another +1 for removing it, it makes it way too easy to do something unfortunate, and it's behavior is only really intuitive if you come from PHP, otherwise my first question is, "Where does it look first!?!" every time I see it used. Alex On Wed, Oct 16, 2013 at 8:14 AM, Shai Berger wrote: >

Re: A policy on calling super()

2013-09-29 Thread Alex Gaynor
It matters if you're going to mixin a class whose common ancestor is object, e.g.: class FooMixin(object): def __init__(self): self.foo = 3 class MyModel(models.Model, FooMixin): pass if models.Model.__init__ doesn't call super().__init__, then FooMixin.__init__ won't be invoked

Performance Docs

2013-09-20 Thread Alex Gaynor
Hi all, I didn't follow this PR as it was in progress, but I just sat down and read them. I have to say I'm extremely saddened by https://docs.djangoproject.com/en/dev/topics/performance/#alternative-software-implementations. This seems like extremely bad advice to me. In my work I've had the opp

Re: Hybrid Property request

2013-07-16 Thread Alex Gaynor
I'm going to suggest that a virtual field and a materialized field are slightly different concepts, and porblaly have different internals. The former requires some hooks in the ORM, the latter is really just some nice wrapping around existing hooks. In any event there's probably some overal with t

Re: Migrations, commands and syncdb

2013-05-30 Thread Alex Gaynor
I'm broadly +1 on deprecating syncbd, it's possibly the most inaccurately named thing in all of Django (hint: it doesn't sync anything). Alex On Thu, May 30, 2013 at 11:03 AM, Andrew Godwin wrote: > Hi everyone, > > I'm starting to plan out the commands for the new migrations stuff in > Django

Re: Cursor closing or reuse: am I missing something?

2013-05-17 Thread Alex Gaynor
Right now Django absolutely does not close all cursors, if you look at django/db/models/sql/compiler.py def execute_sql (sorry, going from memory here) you'll see this. It'd be good if it did. There used to be some crazy stuff around reading chunks and emitting those, now that I believe Anssi has r

Re: first() and last(), earliest() and latest()

2013-05-16 Thread Alex Gaynor
Querysets definitely support indexing. Alex On Thu, May 16, 2013 at 2:51 PM, Alex Ogier wrote: > QuerySets don't support indexing. I'm not entirely sure why, but I > think the reason is to encourage more efficient database usage, since > naive usage of indexing would lead to many repeated LIMI

Re:

2013-05-02 Thread Alex Gaynor
I'll also second that, in addition to the methodological flaws I see, they don't do any testing of running Django under PyPy, which has seen significant speed boosts in the wild. Alex On Thu, May 2, 2013 at 10:50 AM, Jacob Kaplan-Moss wrote: > On Thu, May 2, 2013 at 1:34 PM, Michał Nowotka wro

Re: Changing deferred model attribute behavior

2013-04-25 Thread Alex Gaynor
Sorry, I misunderstood the original request. Yes, you're right Anssi and Adrian, finding them on demand is reasonable. Alex On Thu, Apr 25, 2013 at 4:59 PM, Anssi Kääriäinen wrote: > On 25 huhti, 20:08, Alex Gaynor wrote: > > This sounds like a reasonable request, I don't

Re: Changing deferred model attribute behavior

2013-04-25 Thread Alex Gaynor
This sounds like a reasonable request, I don't yet have an opinion on API or anything. One tiny thing I'd like to note though, "change DeferredAttribute to find all *other* DeferredAttributes". I don't think `finding` is the right way to think about it, a `DeferredAttribute` with loadall semantics

Re: django.utils.simplejson + stdlib json

2013-04-11 Thread Alex Gaynor
When doing what? What do I need to do to trigger this? Alex On Apr 11, 2013 6:16 PM, "Jeremy Dunck" wrote: > If a user of django has simplejson installed, django itself will use both > the stdlib and simplejson. > > On Apr 11, 2013, at 5:54 PM, Alex Gaynor wrote: >

Re: django.utils.simplejson + stdlib json

2013-04-11 Thread Alex Gaynor
I basically agree with what Bob said on the ticket, it's unclear to me from your email how this manifests, other than trying to use something from the standard library with simplejson, which is obviously wrong. Alex On Thu, Apr 11, 2013 at 5:51 PM, Jeremy Dunck wrote: > I've just seen a docume

Re: Using EXISTS instead of IN for subqueries

2013-03-26 Thread Alex Gaynor
For what it's worth, SQL2011 does define OFFSET, finally. Alex On Tue, Mar 26, 2013 at 5:00 PM, Petite Abeille wrote: > > On Mar 26, 2013, at 4:19 PM, Michael Manfre wrote: > > > Maybe someday the non-standard LIMIT/OFFSET keywords will get added to > the > > standard (I truly hope this happen

Re: Using EXISTS instead of IN for subqueries

2013-03-25 Thread Alex Gaynor
I have no idea how EXISTS performs on MySQL, however I can say that IN + subqueries on MySQL are so atrocious that we outright banned that where I work, so I don't see how it could be worse :) Alex On Mon, Mar 25, 2013 at 8:37 AM, Anssi Kääriäinen wrote: > On 25 maalis, 13:23, Simon Riggs wrot

Re: Proposal: deprecate and remove django.contrib.comments

2013-03-07 Thread Alex Gaynor
It's not like /dev/null'ing it erases it from the annals of history. I don't see what the point of creating an un-maintained repo is, if someone decides they want to maintain it at some later point it's pretty trivial to resurrect from VCS history. Alex On Thu, Mar 7, 2013 at 4:29 PM, Michael Ma

Re: Proposal: deprecate and remove django.contrib.comments

2013-03-07 Thread Alex Gaynor
Jumpin' on the +1 train. Choo, choo! Alex On Thu, Mar 7, 2013 at 9:04 AM, Donald Stufft wrote: > On Mar 7, 2013, at 11:48 AM, Jacob Kaplan-Moss wrote: > > > Hi folks -- > > > > This one's simple: I'd like to deprecate `django.contrib.comments`, > > scheduling it to be removed in a couple of r

Re: Switch to database-level autocommit

2013-03-01 Thread Alex Gaynor
+1 from me. Here's a patch to add autocommit to MySQL: https://github.com/django/django/pull/857 FWIW: any sort of scheme where a transaction is kept open all request (including a transaction that only ever reads), will cause you serious pain if you're trying to do migrations on MySQL with traffic

Re: Database pooling vs. persistent connections

2013-02-19 Thread Alex Gaynor
I don't really see what point such an option would serve. This is *not a connection pool*. Currently Django uses one open connection per thread, this simple keeps them open between requests. That means before: you needed O(concurrent threads) connections, now you need O(total active threads) connec

Re: clarification of API backwards-compatibility policy

2013-02-19 Thread Alex Gaynor
I agree, backwards compatibility for an API should be opt-in (via documenting), not opt-out (via naming). Alex On Tue, Feb 19, 2013 at 1:56 PM, Carl Meyer wrote: > Hi, > > I was just about to tell someone on IRC that Django's > backwards-compatibility policy only applies to documented methods

Re: Database pooling vs. persistent connections

2013-02-18 Thread Alex Gaynor
As far as I know, the MySQL timeout time is configurable, and the default is 8 hours. Alex On Mon, Feb 18, 2013 at 2:30 PM, Karen Tracey wrote: > Just a couple of random quick thoughts: > > Will persistent connections be able to ensure that "bad connections" (e.g. > those in state "current tra

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2013-01-01 Thread Alex Gaynor
I would like to *strongly* object to adding any notion of root path (and relative paths with it) to Django. This would be furthering the notion that a django project is a thing. It's not. You don't hear twisted people talking about the twisted project root, or any other python package. The notion o

Re: First request - Modify django.core.management.color with settings option

2012-12-19 Thread Alex Gaynor
I too think a setting is inappropriate for this, I'm also a little skeptical of an env var, is this not a bug with PyCharm? Alex On Wed, Dec 19, 2012 at 1:08 PM, Florian Apolloner wrote: > I dislike a setting for this, an optional environment variable would make > more sense imo (since you usua

Re: Proposal: Composite Foreign Keys

2012-11-29 Thread Alex Gaynor
No, there is no such solution in the codebase. Are you aware of a patch we should be reviewing on this issue? Alex On Thu, Nov 29, 2012 at 2:43 PM, Ron Smith wrote: > So here we are 4 years later, version 1.5 is about to be released and we > still don't have a solution for composite primary ke

Re: GitHub migration

2012-11-25 Thread Alex Gaynor
One major improvement I've seen is that when there's a small issue in a commit (such a typo) a contributor often leaves an inline comment and it can get fixed directly. This is a great workflow for simple issues. Alex On Sun, Nov 25, 2012 at 3:46 PM, Aymeric Augustin < aymeric.augus...@polytechn

Re: proposal: post-collectstatic signal

2012-11-10 Thread Alex Gaynor
What's the use case? Alex On Sat, Nov 10, 2012 at 8:48 PM, Justin Holmes wrote: > Currently, our only built-in management signal is post-syncdb. > > I propose (and, notwithstanding objection, will build) > post-collectstatic. > > Is this reasonable? Is there another, less invasive way to hook

Re: Call for use cases of metrics in django core

2012-10-31 Thread Alex Gaynor
On Wed, Oct 31, 2012 at 9:52 PM, Eric Holscher wrote: > A couple obvious places: > > Latency to backend systems. So, any time that I call out to my cache > backend or database, keep track of round trip latency of those. > > Full system latency. So, From the time a request enters the URL routing >

Re: Add a "split" field to a model causes problems

2012-10-23 Thread Alex Gaynor
On Tue, Oct 23, 2012 at 5:11 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > > On Tue, Oct 23, 2012 at 6:52 PM, Andrew Ingram wrote: > >> Hi all, >> >> This one stung me today. Basically as part of an event (calendar) app, I >> have functionality for splitting a series of events into

Re: save() method could return the object

2012-10-12 Thread Alex Gaynor
On Fri, Oct 12, 2012 at 6:40 AM, Chris Wilson wrote: > On Fri, 12 Oct 2012, Marijonas Petrauskas wrote: > > There already exists create method that does exactly what you need:obj = >> SomeModel.objects.create(name=**'foo', age=42) >> > > OK, thanks, that appears to be completely undocumented. >

Re: save() method could return the object

2012-10-12 Thread Alex Gaynor
On Fri, Oct 12, 2012 at 6:36 AM, Yo-Yo Ma wrote: > +1 > > A lot of people are overriding ``save`` and not returning anything, but > this isn't going to hurt them (ideally, they should already be returning > the result of ``super(``, but nobody does). > > > On Friday, October 12, 2012 9:25:46 AM U

Re: URL dispatcher slow?

2012-10-11 Thread Alex Gaynor
On Thu, Oct 11, 2012 at 6:52 AM, Daniel Sokolowski < daniel.sokolow...@klinsight.com> wrote: > I absolutely agree with: if we were looking for speed we wouldn't use > python at all (period). > > Speak for yourself. Alex -- "I disapprove of what you say, but I will defend to the death your rig

Re: ORM refactoring, part 2

2012-09-25 Thread Alex Gaynor
On Tue, Sep 25, 2012 at 7:25 AM, Jacob Kaplan-Moss wrote: > On Tue, Sep 25, 2012 at 3:23 AM, Anssi Kääriäinen > wrote: > > I'd like to postpone these to early next month so that I have more > > time to help in reviews and pushing some new features in. Other > > options are postponing review work,

Re: Schema Alteration - Review needed!

2012-09-17 Thread Alex Gaynor
On Mon, Sep 17, 2012 at 3:59 PM, Andrew Godwin wrote: > Hi all, > > I have now, I believe, got a working, feature-complete schema alteration > branch ready to go. It has full support for PostgreSQL, MySQL, and SQLite, > and follows the rough design principles I emailed the list about a while > ba

Re: iPython behaves strangely only with Django shell

2012-08-29 Thread Alex Gaynor
On Wed, Aug 29, 2012 at 9:37 AM, Jacob Kaplan-Moss wrote: > This looks like some sort of error in your environment; I can't reproduce > it:: > > $ ./manage.py shell > In [1]: import decimal > > In [2]: class F(object): >...: d = decimal.Decimal('0') >...: > > In

Re: Auto-import support for models and other objects in shell

2012-08-28 Thread Alex Gaynor
On Tue, Aug 28, 2012 at 2:40 PM, Phill Tornroth wrote: > 'Ello. > > I'm gauging support for a tiny new feature, or at least a refactoring of > an internal API that will allow the feature to be developed without code > duplication. I'd like to stop typing import statements for all of my models > an

Re: ORM refactoring, part 2

2012-08-25 Thread Alex Gaynor
On Sat, Aug 25, 2012 at 12:35 PM, Anssi Kääriäinen wrote: > I have done some more ORM refactoring work. I thought it would be a > good idea to post a summary of what is going on. > > First, I haven't committed the utils.tree refactoring patch I was > planning to commit [https://github.com/akaariai

Re: Streaming HttpResponse revisted. Any core devs, please take a look if you can :)

2012-08-20 Thread Alex Gaynor
On Mon, Aug 20, 2012 at 12:19 PM, Anssi Kääriäinen wrote: > > > On 20 elo, 18:39, Tai Lee wrote: > > I'd like to re-visit the discussion surrounding #7581 [1], a ticket about > > streaming responses that is getting quite long in the tooth now, which > > Jacob finally "accepted" 11 months ago (aft

Re: Breaking out localflavor

2012-08-16 Thread Alex Gaynor
On Thu, Aug 16, 2012 at 9:42 PM, Jacob Kaplan-Moss wrote: > On Thu, Aug 16, 2012 at 3:38 PM, Adrian Holovaty > wrote: > > You mean like a magic import thing, right? > > Well, Python *does* have some namespace package support stuff. It's > something of a mess, with one implementation internally, a

Re: Breaking out localflavor

2012-08-16 Thread Alex Gaynor
On Thu, Aug 16, 2012 at 9:38 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Fri, Aug 17, 2012 at 5:26 AM, Adrian Holovaty > wrote: > > I'd like to move all Django localflavor code into a separate package, > > distributed separately from Django the framework. > > +1. I've had the e

Re: new syntax for management commands

2012-08-12 Thread Alex Gaynor
On Sun, Aug 12, 2012 at 4:51 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Sun, Aug 12, 2012 at 6:32 PM, Florian Apolloner > wrote: > > Hi, > > > > > > On Sunday, August 12, 2012 2:22:58 AM UTC+2, Russell Keith-Magee wrote: > >> > >> I'll agree that it looks appealing. However, a

Re: Python 3 - style question

2012-08-10 Thread Alex Gaynor
On Fri, Aug 10, 2012 at 3:45 PM, Simon Meers wrote: > > On 10 August 2012 18:56, Vinay Sajip wrote: > >> I think Option 2 is better, for the reasons you state. > > +1. And it's not too entangled to be easily stripped out if/when > Python 2 support is removed. > > On 11 August 2012 06:10, Łukasz

Re: I think adding a "first" method to the QuerySet be useful.

2012-07-02 Thread Alex Gaynor
On Mon, Jul 2, 2012 at 9:27 PM, Maxime Haineault wrote: > One of the common pitfall I come across way to often with novices is > something like this: > > def getFirstUser(): > return User.objects.all()[0] > > It looks innocuous and often wont raise any exceptions in dev because you > d

Re: Proposal: Add some extensibility / decoupling features to Django templates

2012-06-24 Thread Alex Gaynor
On Sun, Jun 24, 2012 at 2:50 PM, Jacob Kaplan-Moss wrote: > On Sat, Jun 23, 2012 at 7:17 PM, Yo-Yo Ma > wrote: > > Without changing any of the existing functionality or settings in Django, > > refactor the template system to use an ``Environment`` class (something > akin > > to Jinja2's ``Environ

Re: Proposed Field API additions

2012-06-07 Thread Alex Gaynor
On Thu, Jun 7, 2012 at 12:17 PM, Andrew Godwin wrote: > Hi everyone, > > As part of my planning for adding schema alteration/migrations into > Django proper, I need to make a few changes to Fields to allow for > better serialisation of model definitions (pretty much a requirement for > any change

Re: auth.user refactor: the profile aproach

2012-04-05 Thread Alex Gaynor
On Thu, Apr 5, 2012 at 1:02 PM, Adrian Holovaty wrote: > 2012/4/5 Ian Lewis : > > I'm curious though how the admin fits into your ideas. If you wanted to > use the > > admin, would you have to use a User model that has and or supports all > the > > cruft on the current user model? e.g. username,

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Gaynor
On Thu, Mar 29, 2012 at 10:06 PM, Alex Ogier wrote: > So in the process of removing simplejson I realized it's not strictly > true that we no longer need to bundle it: if someone uses 2.6+ but has > a 'json' module with a different interface sitting in front of the > system json on sys.path, then

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Gaynor
On Thu, Mar 29, 2012 at 6:07 PM, Łukasz Rekucki wrote: > Alex's comment on ticket #18013 reminded me of this. Is there any > reason not to get rid of the Django's version of simplejson now that > Python 2.6 always has the json module? > > I see three options here: > > 1) Remove Django's copy and

Re: Tagging 1.4 django release in Subversion

2012-03-26 Thread Alex Gaynor
On Mon, Mar 26, 2012 at 9:00 PM, Łukasz Rekucki wrote: > On 27 March 2012 02:44, Reinout van Rees wrote: > > On 26-03-12 18:13, Florian Apolloner wrote: > >> > >> > >>I'm also intrigued how you have a release tarball before you have > >>tagged the release! > >> > >> It's magic :ş > > > >

Re: call_command; add *.pyc and *.pyo files to commands list

2012-02-29 Thread Alex Gaynor
On Wed, Feb 29, 2012 at 6:56 PM, John Paulett wrote: > Related tickets are #14952 and #12206. #14952 includes a possible > patch, but marked as wontfix. > > However, I'm definitely +1 on adding support for pyc/pyo support for > management commands. I understand the arguments against deploying >

Re: Revisiting multiline tags

2012-02-24 Thread Alex Gaynor
in the eyes of the beholder, but the reason we have BDFLs is to keep those decisions consistent. Glyph Lefkowitz's keynote from DjangoCon this year really drives this home. > > On Feb 24, 10:15 am, Daniel Moisset wrote: > > On Fri, Feb 24, 2012 at 12:12 PM, Alex Gaynor > wro

Re: Revisiting multiline tags

2012-02-24 Thread Alex Gaynor
On Fri, Feb 24, 2012 at 10:01 AM, Daniel Moisset wrote: > On Fri, Feb 24, 2012 at 6:01 AM, Stephan Jaensch wrote: > >> This thread contains 6 people expressing support for this change, and 2 > against (a BDFL, a core developer) -- and you can add me to the -0 list. > There are over 6000 subscribe

Re: Why recommend to include project name in settings?

2012-02-10 Thread Alex Gaynor
On Fri, Feb 10, 2012 at 10:57 AM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 02/10/2012 08:47 AM, Adam "Cezar" Jenkins wrote: > > On Fri, Feb 10, 2012 at 9:50 AM, Carl Meyer > > wrote: > > > > "import .module" > > > > > > Not arguing o

Re: start using less (and bootstrap!)

2012-02-02 Thread Alex Gaynor
On Thu, Feb 2, 2012 at 5:01 PM, Adrian Holovaty wrote: > On Thu, Feb 2, 2012 at 2:49 PM, Sean Brant wrote: > > Is this up somewhere public? I've been fighting the urge to do this as > > well. Using django-compressor with less on Heroku is a non-starter > > since you can't install node. Having th

Re: RFC: Query Methods

2012-01-03 Thread Alex Gaynor
On Tue, Jan 3, 2012 at 11:43 AM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Zachary, > > On 01/02/2012 10:55 PM, Zachary Voase wrote: > > At the moment it's very easy to add methods to individual models, just > > by putting a method on the model class itself which

Re: DoS using POST via hash algorithm collision

2011-12-29 Thread Alex Gaynor
On Thu, Dec 29, 2011 at 10:32 AM, Daniel Sokolowski < daniel.sokolow...@klinsight.com> wrote: > Would someone be so kind and explain why POST variables are stored in hash > tables? What is the reasoning behind it? Speed? Or is this simply done at > the Python level when using a dictionary type? Th

Re: SOPA bill question

2011-12-27 Thread Alex Gaynor
No, really guys this is totally off topic for this list. Please find an appropriate one for this discussion. Alex On Dec 27, 2011 11:16 PM, "James Richards" wrote: > I do agree that the fundamental point of Django is free distribution of > content. Are developers now obligated to design softwa

Re: Django error page - MemoryError

2011-12-20 Thread Alex Gaynor
On Tue, Dec 20, 2011 at 1:56 PM, Paul McMillan wrote: > > Place a try/catch for MemoryError on the exception handler to send back a > > simple exception traceback to the browser. > > Yes, this makes sense, as long as we are sure the memory error is > raised by Django code, not user code. > > > In

Re: Proposal: drop Python 2.5 support in Django 1.5

2011-12-10 Thread Alex Gaynor
On Sat, Dec 10, 2011 at 7:35 PM, Paul Egges wrote: > +1 > > I thought there was an implicit understanding that only 3 versions of > Python would be supported at any given time. If so it makes sense to drop > support for 2.4 when we add 3.x. > > > > On Sat, Dec 10, 2011 at 9:22 AM, Jannis Leidel

Re: FileField should be a context manager

2011-12-08 Thread Alex Gaynor
On Thu, Dec 8, 2011 at 5:35 PM, Jacob Kaplan-Moss wrote: > On Thu, Dec 8, 2011 at 2:07 PM, Martin Chase > wrote: > > This shouldn't be backwards incompatible, just implementing the > > __exit__ and __enter__ methods. > > > > Use case: > > > > class Obj(models.Model): > >file_field = models.F

Re: Adding Support for PyMySQL (for Python 3)

2011-12-07 Thread Alex Gaynor
On Wed, Dec 7, 2011 at 5:17 PM, Ian Clelland wrote: > On Wed, Dec 7, 2011 at 1:07 PM, Alex Gaynor wrote: > >> I'm saying database backends need badly to me refactored to split up >> these two seperate concerns. >> > > Agreed, then. Is there a ticket for thi

Re: Adding Support for PyMySQL (for Python 3)

2011-12-07 Thread Alex Gaynor
On Wed, Dec 7, 2011 at 4:03 PM, Ian Clelland wrote: > > > On Wed, Dec 7, 2011 at 12:48 PM, Alex Gaynor wrote: > >> It's a fine goal, though I'm not convinced this should necessarily ship >> with Django given PyMySQL has relatively few users. > > >

Re: Adding Support for PyMySQL (for Python 3)

2011-12-07 Thread Alex Gaynor
On Wed, Dec 7, 2011 at 3:38 PM, Ian Clelland wrote: > Hi, all --- > > This is a proposal to add support in Django for PyMySQL[1] as an optional > replacement for MySQLdb. > > I've been working with Vinay Sajip's Python 3-compatible branch; trying to > get MySQL support working, and I have had a g

Re: Python 3 port - all tests now pass on 2.5.4, 2.6.2, 2.7.2 and 3.2.2 with the same codebase

2011-12-05 Thread Alex Gaynor
On Mon, Dec 5, 2011 at 2:07 PM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/05/2011 11:56 AM, Jeremy Dunck wrote: > > Carl, to be clear, if py3 pg is slower, but py2 pg is still in line w/ > > baseline, would that block merge to trunk? It's quite possible the >

Re: Improving test data experience

2011-11-30 Thread Alex Gaynor
On Wed, Nov 30, 2011 at 5:22 PM, Jeremy Dunck wrote: > Hi all, > I've got a codebase with a fair bit of fixtures and have been > experiencing some pain around it. One of the pains is migrating the > format of fixtures when a schema change occurs. > > I posted a thread to south-users to discuss

Re: Deploy Django to hostmonster

2011-11-17 Thread Alex Gaynor
On Thu, Nov 17, 2011 at 9:41 PM, Tran Bac Son wrote: > Hello, > I'm new in Django. I had write my own website by Django but I got problems > in deploying it to hostmonster. > The detail of my problem is: > http://stackoverflow.com/questions/8156173/django-cant-run-in-hostmonster > Please help me

Re: Django Docs for Forms - Alternative Pattern from Advanced Django Forms Usage talk?

2011-10-23 Thread Alex Gaynor
Danny, I think you meant that for a different thread. Alex On Mon, Oct 24, 2011 at 1:36 AM, Daniel Greenfeld wrote: > One of the things that I think would be wonderful is to see this and other > issues such as server specific settings actually described in a Django best > practices document. An

Re: Feature request prop for django db cache extention

2011-10-15 Thread Alex Gaynor
On Sat, Oct 15, 2011 at 8:23 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Sunday, October 16, 2011, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > > Hi Russell, > > Thanks for the detailed response. It looks like both those solutions you > p

Re: Having Django supporting IDEs represented at http://djangoproject.com/

2011-10-11 Thread Alex Gaynor
On Tue, Oct 11, 2011 at 9:21 AM, Jacob Kaplan-Moss wrote: > On Tue, Oct 11, 2011 at 7:27 AM, Dmitry Jemerov > wrote: > > I've discussed this with Russell Keith-Magee during DjangoCon.EU, and he > > seemed to be in favor of this. Does the community think that it's > > worthwhile? Is there anything

Re: Corporate CLA

2011-10-10 Thread Alex Gaynor
On Mon, Oct 10, 2011 at 7:51 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Tue, Oct 11, 2011 at 5:57 AM, Justin Holmes > wrote: > > I am interested in getting the SlashRoot membership all filed with CLA's. > > > > However, people who work on django at SlashRoot aren't "employees"

Re: r16912 and friends

2011-09-29 Thread Alex Gaynor
On Thu, Sep 29, 2011 at 6:36 PM, Luke Plant wrote: > On 29/09/11 18:23, Alex Gaynor wrote: > > > Your right, there should be an additional assert. FWIW it's not even a > > time/memory tradeoff, it's just savings. Type objects on every Python > > VM are some

  1   2   3   4   5   6   >