Re: Widening participation (Thoughts from DjangoCon)

2018-10-26 Thread Jeremy Dunck
An alternative that might work well is to triage tickets to mentors, so that a list of tickets with willing mentors is available. It would feel less judge-y than "easy pickings" and also broaden the pool of tickets that could be worked by a newcomer. Of course it hinges on a willing pool of

Re: TransactionManagementError is raised when autocommit …

2016-03-14 Thread Jeremy Dunck
You can use atomic just over the section that causes the error. The issue is that different db engines have different semantics under error during transaction. Rolling back to the last savepoint (as atomic does when nested) recovers the ability to complete the remainder of the transaction. With a

Re: TransactionManagementError is raised when autocommit …

2016-03-05 Thread Jeremy Dunck
I've had this scenario before - you have two interleaving units of work (through composition of code from different sources or concerns). You want progress recorded for one unit of work, but perhaps not the other. Without django, you'd have two open connections. In my experience the simplest

Re: Testing Signals

2015-08-14 Thread Jeremy Dunck
I suspect you have 2 different definitions of the signal under different import paths. Ensure your python path doesn't have overlapping directories, and that your signal imports refer to the same sys.modules key (e.g. some_app.signals.foo all over, not proj.some_app.signals.foo and

Re: Multiple template engines for Django - week 13

2015-01-03 Thread Jeremy Dunck
If getting proper support for other template backends would only delay the 1.8 release timeline by a couple weeks, I think that is preferable to a generalized 1.8 backend which only include DTL until 1.9. What do others think? On Sat, Jan 3, 2015 at 3:23 PM, Aymeric Augustin <

Re: status of 1.8 release blockers

2015-01-03 Thread Jeremy Dunck
Thank you, Tim, for shepherding this. On Jan 3, 2015 8:09 AM, "Tim Graham" wrote: > Here is the fourth update with a week to go until alpha. At this time, I > am thinking we'll have the feature freeze on Monday, January 12 as planned, > but perhaps issue the actual alpha

Re: Storage engine aliases?

2014-09-29 Thread Jeremy Dunck
ecurity. I think it’s useful to keep > the concepts separate, even if they ultimately depend on the same APIs — > basically the Storage base class that defines the usual file APIs plus an > URL. > > -- > Aymeric. > > > On 29 sept. 2014, at 22:46, Jeremy Dunck <jdu...@gmail

Storage engine aliases?

2014-09-29 Thread Jeremy Dunck
Right now, I think that static/media handling is fairly confused in the documentation, and a bit confused in the code itself. We have a few special-cases floating around: default_storage (needed for legacy before storage backends) staticfiles_storage (needed for collectstatic/handling)

Re: Two proposals for the Django Code of Conduct.

2014-09-09 Thread Jeremy Dunck
As someone affected by an issue that would fall under the proposed change [1], I still support an explicit guideline about external behavior influencing internal acceptance. The safety of all members is more important than the risk of misapplication of the rule. [1]

Re: Would AssertMaxQueries (similar to AssertNumQueries) be a useful addition

2014-08-17 Thread Jeremy Dunck
I use this method on my own test subclasses, and I find it useful as a tripwire: a cause for review and consideration, more than a hard error. Did the number of queries go up on this change? Is that reasonable or a mistake? Have we blown the perf budget so we should refactor? Or maybe the number

narrow writes (as 3rd-party library)

2014-07-16 Thread Jeremy Dunck
I'm attempting to implement narrow writes (that is, writing only fields which have changed). I would be able to do this as a 3rd-party Mixin library if some changes were made to Model.save_base. 1) returned whether the row was created or updated, e.g. if .save_base returned the `updated`

Re: django-firebird backend: migrations and NULL fields

2014-05-14 Thread Jeremy Dunck
How about adding a flag to Operations? implied_null, perhaps. On May 14, 2014 7:52 AM, "Andrew Godwin" wrote: > Hi, > > That's currently the only approach I'm afraid - there's an open issue > (raised by Shai Berger I believe) that column_sql should be broken down > into more

Re: Proposal for prepared statements API

2014-03-25 Thread Jeremy Dunck
On the None -> IS NULL issue, I presume there are, for any given use case, not that many argument permutations of None and not None passed. I suggest that the PreparedStatement abstraction map to multiple actual prepared statements, one for each None/not None permutation. Then when executing,

Re: Callable LazyObject?

2014-03-06 Thread Jeremy Dunck
:12 AM, Luke Plant <l.plant...@cantab.net> wrote: > On 05/03/14 23:05, Jeremy Dunck wrote: > > > if ... > > elif isinstance(value, LazyObject): > > pass > > elif callable(value): > > ... > > My gut instinct is that if Django's template code has

Callable LazyObject?

2014-03-05 Thread Jeremy Dunck
I recently had a need for a LazyObject which was callable. The __call__ meta method isn't forwarded to _wrapped, so it's an error to call, even if the underlying _wrapped does support it. In my case, was trying to do the following: User = SimpleLazyObject(lambda: get_user_model()) User()... I

Re: Benchmarking 1.5 vs 1.6

2013-09-17 Thread Jeremy Dunck
It may be useful to place a comment where @wraps was removed, lest some later do-gooder "fix" it. On Sep 17, 2013, at 12:06 AM, Marc Tamlyn wrote: > Can't say I'm hugely worried about perfect tracebacks and introspection with > internal kind of functions here if it

Re: Not calling things twice in templates

2013-06-02 Thread Jeremy Dunck
I've had this issue and have used {% with %} or moved the my.bonnet() call into the view/context.I agree, not ideal, but I was never moved to make it better in general. If you're suggesting a general caching layer in the template such that a given expression is only called once in the course

Re: django.utils.simplejson + stdlib json

2013-04-13 Thread Jeremy Dunck
After reading that ticket, I'm not sure what Alex and I are disagreeing on. I was suggesting using django.utils.simplejson internally until it's removed, so that at least people could be consistent with django itself. That way, DjangoJSONEncoder would be a simplejson.JSONEncoder (if simplejson

Re: django.utils.simplejson + stdlib json

2013-04-11 Thread Jeremy Dunck
ONEncoder) which, despite django.utils.simplejson only > being in a pending deprecation state, is broken. > > On Thu, Apr 11, 2013 at 9:22 PM, Alex Gaynor <alex.gay...@gmail.com> wrote: >> When doing what? What do I need to do to trigger this? >> >> Alex >> >

Re: django.utils.simplejson + stdlib json

2013-04-11 Thread Jeremy Dunck
fests, 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 <jdu...@gmail.com> wrote: >> I've just seen a documented example of this breaking things in the

django.utils.simplejson + stdlib json

2013-04-11 Thread Jeremy Dunck
I've just seen a documented example of this breaking things in the wild. https://github.com/simplejson/simplejson/issues/37 I think we broke backwards-compat here - django 1.5.1. plus sentry 5.4.5 dies because django's own DjangoJSONEncoder depends on stdlib json, but sentry (and lots of things)

Re: "Design Decision Needed" is gone. Good riddance.

2013-04-08 Thread Jeremy Dunck
"easy" is for people new to contributing django or to open source in general. Your view of "easy" may be different than our intended meaning. :) On Mon, Apr 8, 2013 at 2:58 PM, Lennart Regebro wrote: > On Mon, Apr 8, 2013 at 4:57 PM, Jacob Kaplan-Moss

Re: Django Core mentorship list

2013-04-03 Thread Jeremy Dunck
Ahem: [1] https://groups.google.com/forum/?fromgroups#!forum/django-core-mentorship :) On Wed, Apr 3, 2013 at 11:44 AM, Jeremy Dunck <jdu...@gmail.com> wrote: > Hey all, > I've just created django-core-mentorship[1] with founding members > including Carl Meyer, Jacob Kap

Django Core mentorship list

2013-04-03 Thread Jeremy Dunck
Hey all, I've just created django-core-mentorship[1] with founding members including Carl Meyer, Jacob Kaplan-Moss, Simon Charette, and Russell Keith-Magee. Modeled after pythonmentors.com, the intention is to help more people make the leap from using django to contributing to it. It is a

Re: why does django.db.signals map to django.core.signals

2013-03-27 Thread Jeremy Dunck
I'm not sure what you mean by "maps to". The basic signal framework is in django.dispatcher. If you're implementing https://code.djangoproject.com/ticket/11398 then you probably want to import: from django.dispatcher import Signal. django.db imports django.core.signals because it is a *consumer*

Re: Persistent connections, take 2

2013-03-18 Thread Jeremy Dunck
It sounds like we need a way to tell the worker that we are done sending requests to it so that the worker can do cleanup (of which db conn close is one task). This mirrors the previous request_finished "coupling" to requests_finished. (OS?) Signal? Sentinel queue/socket/named pipe +

Re: Switch to database-level autocommit

2013-03-06 Thread Jeremy Dunck
I, for one, would prefer that we not recommend TransactionMiddleware so highly. Now that I'm doing active development with Rails, it's quite clear to me that a major difference in the ORM layers are which DB they grew up with -- the django orm is tuned best to postgres, while working passably on

Re: Switch to database-level autocommit

2013-03-06 Thread Jeremy Dunck
I'm not sure what you're referring to here - integrity, uniqueness, and locking are handled at the individual query level - transactions just cause locks to be held (if needed) until commit or rollback. Can you give a concrete example of an exception being raised at commit time? On Tue, Mar 5,

Re: Switch to database-level autocommit

2013-03-06 Thread Jeremy Dunck
On Mon, Mar 4, 2013 at 1:34 AM, Aymeric Augustin wrote: > On 4 mars 2013, at 01:07, Shai Berger wrote: ... >> The use of savepoints in Django apps so far has been very little, as far as >> I know. One point >> I'm unsure of is the

Re: Full time job opportunity in SF Bay Area - Python/Django developer

2013-01-25 Thread Jeremy Dunck
Please do not send recruitment emails to this mailing list. This is your one warning. Repeating will result in you being banned from the list. On Fri, Jan 25, 2013 at 12:47 PM, wrote: > We are looking for a Full stack engineer with strong python and django > development

Re: Django Admin Revamp - Any updates?

2012-11-23 Thread Jeremy Dunck
For the record: It's bad timing for Idan. He lives in Tel Aviv which is currently receiving intermittent rocket attacks. He may be a bit slow to respond. ;) Let's wish him and his family safety and the luxury of worrying about django's admin in good time. On Thu, Nov 15, 2012 at 7:23 AM,

Call for use cases of metrics in django core

2012-10-31 Thread Jeremy Dunck
If you use/monitor/graph metrics (the idea, not Coda's library, but that would be good, too), I'd like to hear from you. What sort of metrics, under what implementation, would be useful to you operationally? -- You received this message because you are subscribed to the Google Groups "Django

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-10-08 Thread Jeremy Dunck
Would it be reasonable to have a backend-specific hook to determine a fingerprint, where that could be mtime or md5 or whathaveyou as long as equality (or maybe ordering) works? On Oct 8, 2012, at 10:23 AM, Alex Ogier wrote: > On Mon, Oct 8, 2012 at 1:06 PM, ptone

A bit of Django history

2012-10-04 Thread Jeremy Dunck
I was searching around for a different old blog post and found this one: http://jacobian.org/writing/why-django/ It made me smile - we've come a ways since then. :) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group,

Re: Results of testing votizen's py2.6/7 codebase against django master (319e1355190)

2012-09-18 Thread Jeremy Dunck
On Tue, Sep 18, 2012 at 11:23 AM, Jeremy Dunck <jdu...@gmail.com> wrote: ... > And the last one, I hesitate to raise because it's likely to be > specific to my machine, but... our (django-nose-based) test runner > hangs after completing the suite but before tearing down. Using >

Results of testing votizen's py2.6/7 codebase against django master (319e1355190)

2012-09-18 Thread Jeremy Dunck
In response to the call to test py2.x on django's current master, I ran the test suite for Votizen. Our codebase is currently running with django 1.4.x. Our codebase is ~100kloc, ~32kloc of which is tests. We use abstract model inheritance a good bit, but no concrete inheritance. No i18n or

Re: Testing multidb with TEST_MIRROR

2012-09-06 Thread Jeremy Dunck
On Thu, Sep 6, 2012 at 12:16 PM, Anssi Kääriäinen wrote: > On 3 syys, 07:40, Anssi Kääriäinen wrote: >> I would like to make the TransactionTestCase faster. Currently when >> running Django's test suite, for every test ran you will truncate >>

Testing multidb with TEST_MIRROR

2012-09-02 Thread Jeremy Dunck
I have been working on a master/slave router library [1] and have run into some trouble testing a client application of it. The issue is that TestCase (as designed) holds test db writes in a transaction, but the read slave connection (which is to the same DB under TEST_MIRROR) does not have

Re: #16455 PostGIS 2.0 support

2012-08-09 Thread Jeremy Dunck
I'm fairly familiar with the django gis code, but I haven't been following postgis 2.0. Could you point me towards some discussion of the index changes from 1.5 to 2.0? On the face of it, I'm doubtful that they've removed a useful form of indexing with no replacement/alternative. It's hard for

Re: Upcoming sprint to update Django's tutorial

2012-08-04 Thread Jeremy Dunck
cially on Windows its not that uncommon to entirely neglect >> pip/virtualenv. >> >> On Jul 17, 2012 8:31 PM, "Alex Ogier" <alex.og...@gmail.com> wrote: >>> >>> On Tue, Jul 17, 2012 at 3:07 PM, Jeremy Dunck <jdu...@gmail.com> wrote: >>>> >

Re: pre_init/post_init vs. performance

2012-07-27 Thread Jeremy Dunck
Can I get a review of the branch? 25% performance improvement of Model.__init__ in stock django seems worth landing. :) On Wed, Jul 18, 2012 at 3:48 AM, Jeremy Dunck <jdu...@gmail.com> wrote: > On Sun, Jul 15, 2012 at 11:07 AM, Jeremy Dunck <jdu...@gmail.com> wrote: >> >

Re: More efficient m2m assignment SQL

2012-07-27 Thread Jeremy Dunck
On Thu, Jul 26, 2012 at 11:26 PM, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: > On 27 heinä, 08:15, Jeremy Dunck <jdu...@gmail.com> wrote: ... >> I would have expected something along the lines of : >> >> DELETE FROM `api_voter_districts` WHERE `voter_id` = 1

More efficient m2m assignment SQL

2012-07-26 Thread Jeremy Dunck
I have 2 models: class District(Model): pass class Voter(Model): districts = ManyToManyField(District) Sometimes I want to reset the m2m list: voter.districts = other_districts I noticed that this uses ManyRelatedManager._clear_items, which, among other things, boils down to:

Re: pre_init/post_init vs. performance

2012-07-18 Thread Jeremy Dunck
On Sun, Jul 15, 2012 at 11:07 AM, Jeremy Dunck <jdu...@gmail.com> wrote: > > That is indeed what I meant, but I think Anssi's probably right that > this belongs in contribute_to_class instead of a new adhoc thing in > ModelBase.__new__. > > I'll take a swing at making

Re: Git questions

2012-07-18 Thread Jeremy Dunck
On Fri, Jun 8, 2012 at 7:57 AM, Anssi Kääriäinen wrote: > On 8 kesä, 17:28, Luke Plant wrote: >> First, thanks so much to Aymeric and Anssi and others for the >> contribution guidelines, they're very helpful. >> >> I've got some questions that are

Re: Django git guidelines

2012-07-18 Thread Jeremy Dunck
I noticed this hasn't made it to master yet. Could it? I'm running sprints and there's a bit of confusion on how to contribute to git. Cheers, Jeremy On Thu, Jun 7, 2012 at 9:53 AM, Aymeric Augustin wrote: > On 6 juin 2012, at 21:09, Anssi Kääriäinen

Re: Upcoming sprint to update Django's tutorial

2012-07-17 Thread Jeremy Dunck
. I could go either way - my preferred approach isn't right in all cases, and it might seem a distraction to the absolute beginner or a person who has their own opinions. On Mon, Jul 16, 2012 at 11:15 PM, Aymeric Augustin <aymeric.augus...@polytechnique.org> wrote: > 2012/7/16 Jeremy D

Upcoming sprint to update Django's tutorial

2012-07-16 Thread Jeremy Dunck
On August 4, PyLadies SF will collaborate with Django sprinters in San Francisco to improve the Django tutorial. I expect around 30 people will attend, including Alex Gaynor and Karen Rustad ( http://pyvideo.org/video/713/improving-documentation-with-beginners-mind-o ). We'll run a prep session

Re: pre_init/post_init vs. performance

2012-07-15 Thread Jeremy Dunck
On Sun, Jul 15, 2012 at 9:51 AM, Andy McCurdy wrote: > > On Jul 14, 2012, at 6:37 PM, Russell Keith-Magee wrote: > >> >> My only concern is: >> >>> We could store which fields have these hooks upon ModelBase.__new__ >>> construction and so skip most fields and overhead in

pre_init/post_init vs. performance

2012-07-13 Thread Jeremy Dunck
I was poking around in our (Votizen's) use of signals and thinking about making some tooling so that signal usage was a bit more transparent. In doing so, I noticed that GenericForeignKey hooks the model pre_init signal. It does that because GFK needs a chance to munge kwargs from the GFK field

Re: XSS and string interpolation

2012-06-28 Thread Jeremy Dunck
On Jun 28, 2012, at 6:57 AM, Luke Plant wrote: > Hi all, > > 2) Any better name than 'html_fragment'? > I like the general approach, but I miss the security-minded namse of "escape" and "mark safe". Maybe "safe_html_fragment" or "make_safe_html_fragment"? Getting

Re: Announcement: twice-monthly Django sprints in San Francisco

2012-06-11 Thread Jeremy Dunck
I've just opened signup for our 2nd sprint - Saturday, June 16th, from 10a to 6p: http://sfdjangosprint2.eventbrite.com/ Please sign up if you plan to attend -- it's free of course. On Tue, May 22, 2012 at 2:30 PM, Jeremy Dunck <jdu...@gmail.com> wrote: > My company, Votizen, now has

San Francisco sprint info

2012-06-04 Thread Jeremy Dunck
We (Votizen) hosted a 1-day sprint yesterday from 10a to 6p. I had capped attendance at 30 just for logistical reasons - there's room for more but I wanted to gauge interest. 24 people signed up, and I'd guess that about 20 people total were there for at least part of the day. I think we peaked

Re: #18094: signals, model inheritance, and proxy models

2012-06-04 Thread Jeremy Dunck
On Fri, Apr 20, 2012 at 9:01 AM, Anssi Kääriäinen wrote: > On Apr 12, 10:27 pm, Anssi Kääriäinen wrote: >> > So perhaps we do need the signal inheritance behavior to be opt-in when >> > connecting the signal handler. I think I'd like to see a

Re: Non-default managers in related field lookups

2012-06-01 Thread Jeremy Dunck
On Fri, Jun 1, 2012 at 2:26 AM, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Fri, Jun 1, 2012 at 8:53 AM, Jeremy Dunck <jdu...@gmail.com> wrote: ... >> Candidate.context('site') would return a manager depending on the >> requested context. >> (o

Non-default managers in related field lookups

2012-05-31 Thread Jeremy Dunck
It feels to me that each place that ._default_manager is mentioned here is a misfeature: https://github.com/django/django/blob/2cd516002d43cdc09741618f0a0db047ee6d78fd/django/db/models/fields/related.py As an example, we (Votizen) currently have some default managers which show subsets of all

Announcement: twice-monthly Django sprints in San Francisco

2012-05-22 Thread Jeremy Dunck
My company, Votizen, now has an office in San Francisco, just a block from the 4th St Caltrain station. We have room to host sprints - easily 25 people, though we can grow if there is demand. We have a professional kitchen, great coffee gear, and maybe a kegerator soon. There are many great

Re: Application init inconsistent

2012-05-08 Thread Jeremy Dunck
On Tue, May 8, 2012 at 9:33 AM, Alex Ogier wrote: > My guess is that Django is doing some normalization on the name you are > importing. It does this to prevent double imports, for example importing > 'projectname.appname' and 'appname' which would otherwise be considered >

Re: django db library doesn't handle quoted table/field names

2012-04-12 Thread Jeremy Dunck
On Thu, Apr 12, 2012 at 3:06 PM, Craig Lucas wrote: > i have developed a database for a client that uses camel casing in the > database. we are now trying to get a models.py file to mimic the > database structure and i have run into a few bugs with regards to > using quoted

Re: #18094: signals, model inheritance, and proxy models

2012-04-12 Thread Jeremy Dunck
On Thu, Apr 12, 2012 at 9:31 AM, Carl Meyer wrote: > Hi all, > > There's a discussion ongoing on ticket #18094 > (https://code.djangoproject.com/ticket/18094) that has enough potential > back-compat implications that it seems worth getting feedback here. Small note, I'll try to

Re: Looking for some insight into a tiny piece of the django codebase

2012-03-19 Thread Jeremy Dunck
On Mon, Mar 19, 2012 at 11:17 PM, Tim Diggins wrote: > Hi - > > I'm wondering what the lines at the end of django/db/models/ > deletion.py do: > >        for model, instances in self.data.iteritems(): >            for instance in instances: >                

Re: Pretty Django model instaces updating

2012-03-01 Thread Jeremy Dunck
On Thu, Mar 1, 2012 at 9:28 PM, Carl Meyer wrote: > The "only_fields" kwarg suggestion comes from ticket 4102, and it is > primarily intended as a performance optimization for large models by > only sending the values of certain fields to the database at all, > something

Re: Mobile Login????

2012-02-27 Thread Jeremy Dunck
You've mailed the django-developers list which is for development *of Django itself*. The proper mailing list about *using* Django is django-users. Please send this message to django-users unless you're proposing a change to Django. http://groups.google.com/group/django-users On Mon, Feb 27,

Re: Testing multidb without inconsistency

2012-02-25 Thread Jeremy Dunck
On Sat, Feb 25, 2012 at 2:13 AM, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: > On Feb 25, 9:24 am, Jeremy Dunck <jdu...@gmail.com> wrote: >> I have a master and a replica.  In test, the TEST_MIRROR on the >> replica points to master.  I make writes to master

Testing multidb without inconsistency

2012-02-24 Thread Jeremy Dunck
I have a master and a replica. In test, the TEST_MIRROR on the replica points to master. I make writes to master, then read from replica, then assert some numbers. def test_stuff(self): Foo.objects.using('master').create() number_received = do_expensive_computations() # Down in some

Re: Caching back-refernces on one-to-one fields

2012-01-19 Thread Jeremy Dunck
On Thu, Jan 19, 2012 at 5:14 PM, Adrian Holovaty wrote: > On Wed, Jan 18, 2012 at 1:07 PM, Shai Berger wrote: >> I have a small improvement to suggest for one-to-one fields: Make them cache >> back-references on related objects. That is, assume > > Yes!

First-run experience w/ psycopg2 and django 1.3.x

2012-01-18 Thread Jeremy Dunck
There's a known problem w/ latest pg (2.4.2) and we decided not to backport the fix to 1.3.x because there's a workaround. https://code.djangoproject.com/ticket/16250 All well and good, but someone coming to Django w/ postgres will have a bad first-run experience because the docs don't mention

Re: Caching back-refernces on one-to-one fields

2012-01-18 Thread Jeremy Dunck
On Wed, Jan 18, 2012 at 11:07 AM, Shai Berger wrote: > Do you see a reason why I should not post a ticket? +1 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

Re: Proposal: Logout user when they change their password.

2012-01-08 Thread Jeremy Dunck
On Sun, Jan 8, 2012 at 2:57 PM, Arnoud van Heuvelen wrote: ... > 3) Save the password hash (or part of it) in the session and compare > it against our data. If the hash is not the same, the user needs to be > logged out. This wouldn't change the database, but the downside

Re: Sprint in San Francisco

2012-01-02 Thread Jeremy Dunck
Hello all, My apologies for the silence on the sprint plans - holidays and all that. I'm back to looking for space for the sprint - Bitbucket has only recently moved into their new space and are still settling in. Thanks to them for the initial offer. In light of that, I'd like to push

Re: Django sprint

2012-01-02 Thread Jeremy Dunck
Hi Ryan, Actually, I'm still looking to firm up plans. I should have sent info earlier - I'm sorry about that. I'm now hoping to run the sprint Jan 21-22. It may be at Bitbucket's office, or it may not. I'll follow up with more specifics on this tomorrow if at all possible. On Mon, Jan

Re: DoS using POST via hash algorithm collision

2011-12-29 Thread Jeremy Dunck
On Thu, Dec 29, 2011 at 12:10 PM, Paul McMillan wrote: ... >> That seems like a simpler workaround than arch upgrade or replacing >> dict implementation. > > This problem has nothing to do with slowloris. > > Replacing dict implementation prevents an attacker from producing keys

Re: DoS using POST via hash algorithm collision

2011-12-29 Thread Jeremy Dunck
On Thu, Dec 29, 2011 at 8:19 AM, Christophe Pettus wrote: ... > It's an interesting result, but I'm not sure how much to be worried about it > in the field.  A SlowLoris or similar attack would seem to be far more > effective and less implementation-dependent. Slow Loris can

Re: SOPA bill question

2011-12-26 Thread Jeremy Dunck
On Mon, Dec 26, 2011 at 4:33 PM, Etienne Robillard wrote: > What thus you Django developers all think of this proposed law and how could > this may affect open source communities such as Django and Python > to develop novel apps specifically for creating user-generated

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 Jeremy Dunck
On Mon, Dec 5, 2011 at 7:28 AM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/05/2011 08:10 AM, Vinay Sajip wrote: >> Not too bad for a first complete pass. Over two and a half hours to >> run, and that' s running from /dev/shm (IIUC effectively

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-04 Thread Jeremy Dunck
On Sun, Dec 4, 2011 at 5:10 PM, Vinay Sajip wrote: > > On Dec 5, 12:57 am, Anssi Kääriäinen wrote: > >> There is one easy thing you can do for testing, set fsync to off in >> postgresql.conf. The file is probably at /etc/postgresql/9.1/main/ >>

Re: Sprint in San Francisco

2011-12-03 Thread Jeremy Dunck
On Sat, Dec 3, 2011 at 1:27 PM, Brodie Rao wrote: > Bitbucket/Atlassian would love to host a sprint. We're about to move > from the Mission to our own office building in SoMa in a couple of > weeks. We'll have plenty of space for anyone who wants to attend. Thanks for the

Re: Sprint in San Francisco

2011-12-03 Thread Jeremy Dunck
On Sat, Dec 3, 2011 at 7:59 PM, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Saturday, December 3, 2011, Jeremy Dunck <jdu...@gmail.com> wrote: >> Hey all, >>  With the 1.4 release coming up, I thought it'd be a good time to >> schedule a sprint to ge

Sprint in San Francisco

2011-12-02 Thread Jeremy Dunck
Hey all, With the 1.4 release coming up, I thought it'd be a good time to schedule a sprint to get in any ponies or help shake out bugs. I'm in San Francisco these days, which I hear is an OK place to try to host a sprint. Given the holidays coming up shortly, I was planning for just after

Re: Improving test data experience

2011-11-30 Thread Jeremy Dunck
On Wed, Nov 30, 2011 at 2:26 PM, Adrian Holovaty wrote: > Just to be clear, how would you get the "diff" of what's changed? > Would it automatically change the fixture files after you close the > shell session? Or would that be up to you? Yes, I was thinking of catching

Re: Improving test data experience

2011-11-30 Thread Jeremy Dunck
On Wed, Nov 30, 2011 at 11:30 PM, Aymeric Augustin wrote: ... > In my current job we're using https://github.com/rbarrois/factory_boy, we've > dropped all but the most trivial fixtures (sites, languages, an admin user), > and we haven't looked back. Nifty,

Improving test data experience

2011-11-30 Thread Jeremy Dunck
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 the idea of adding a feature to aid applying migrations to

Re: Clearing cache between tests (#11505)

2011-10-30 Thread Jeremy Dunck
On Sun, Oct 30, 2011 at 4:19 PM, Jeremy Dunck <jdu...@gmail.com> wrote: > On Sun, Oct 30, 2011 at 8:48 AM, Jim Dalton <jim.dal...@gmail.com> wrote: > ... >> Anyhow, I honestly agree with you and Aymeric that a simple cache.clear() is >> fine, but I thought the CLEAR

Re: Clearing cache between tests (#11505)

2011-10-30 Thread Jeremy Dunck
On Sun, Oct 30, 2011 at 8:48 AM, Jim Dalton wrote: ... > Anyhow, I honestly agree with you and Aymeric that a simple cache.clear() is > fine, but I thought the CLEAR_BETWEEN_TESTS flag was a good way to answer any > objections that we should be cautious about clearing the

Re: Cleaning up manage.py and import paths

2011-10-12 Thread Jeremy Dunck
On Mon, Oct 10, 2011 at 3:05 PM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 ... > 2. People write code that imports things inconsistently (sometimes with > the project prefix, sometimes without it), and then when they go to > deploy (without manage.py or

Re: #17028 - diveintopython.org links now dead

2011-10-12 Thread Jeremy Dunck
How about: http://web.archive.org/web/20110726001211/http://diveintopython.org/ ? On Wed, Oct 12, 2011 at 2:37 AM, rikuthero...@gmail.com wrote: > Hello, > > As described on the ticket [1], it seems that diveintopython.org is dead, so > I changed every occurence for  the

Re: Shouldn't views.generic.create_update.lookup_object use the default manager instead of .objects?

2011-10-08 Thread Jeremy Dunck
It is indeed a bug. On Fri, Oct 7, 2011 at 10:19 AM, Guilherme Salgado wrote: > Hi there, > > That function uses .objects on whatever model is passed to it by > update_object() (or delete_object()), and I can't think of a reason to > use that instead of the default manager

Re: We're a group of students at UC Berkeley looking to contribute to Django

2011-09-27 Thread Jeremy Dunck
On Wed, Sep 28, 2011 at 3:36 AM, Paul McMillan wrote: > I'm Paul, one of the core devs for Django. I'm curious which class > you're enrolled in and what your requirements are. I'm always excited > to see new people looking to get involved in the project, and I happen > to be

Re: confusing things in Trac UI (was: Design decision for #1625...)

2011-09-20 Thread Jeremy Dunck
On Tue, Sep 20, 2011 at 2:16 PM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tuesday, September 20, 2011 1:26:22 PM UTC-6, jdunck wrote: >> Well, I meant to mark accepted as endorsement of the patch, but that >> made me owner. > >> I can't own

Re: Design decision for #1625 - Adding traceback to return value from send_robust when error occurs

2011-09-20 Thread Jeremy Dunck
On Tue, Sep 20, 2011 at 12:09 PM, Jim D. wrote: > Awesome, great suggestions both. That's a cleaner API and the implementation > itself is even slightly cleaner. > I updated the patch and uploaded it to the ticket. If you or anyone else > wants to review it and ideally move

Re: Design decision for #1625 - Adding traceback to return value from send_robust when error occurs

2011-09-20 Thread Jeremy Dunck
On Tue, Sep 20, 2011 at 9:00 AM, Jim D. wrote: > https://code.djangoproject.com/ticket/16245 I've looked at the patch and it seems good to me. I have a suggestion: Rather than (receiver, err, traceback), why not (receiver, exc_info) where exc_info is the triple returned

Semantics when calling select_related repeatedly

2011-09-20 Thread Jeremy Dunck
Currently, calling select_related causes the QS to forget previously added fields. Also, it seems that depth calls are not forgotten. For example, cribbing from the tests here: https://code.djangoproject.com/browser/django/trunk/tests/modeltests/select_related/tests.py#L129 If this:

Re: Just curious, why is admin.site.register([Model], [ModelAdmin]) not done within ModelAdmin?

2011-09-11 Thread Jeremy Dunck
On Sun, Sep 11, 2011 at 11:56 AM, Joshua Russo wrote: > I've wondered this for a while, but is there a reason why the call to > admin.site.register(([Model], [ModelAdmin]) is not done within the init of > ModelAdmin? You can run multiple AdminSite instances mounted at

Re: Race condition in get_or_create

2011-09-02 Thread Jeremy Dunck
gt; > On Fri, Sep 2, 2011 at 11:22 AM, Jeremy Dunck <jdu...@gmail.com> wrote: >> >> On Fri, Sep 2, 2011 at 11:04 AM, Ian Clelland <clell...@gmail.com> wrote: >> > I'm seeing errors which I believe are due to a race condition in >> > django.db.model

Re: Race condition in get_or_create

2011-09-02 Thread Jeremy Dunck
On Fri, Sep 2, 2011 at 11:04 AM, Ian Clelland wrote: > I'm seeing errors which I believe are due to a race condition in > django.db.models.query.get_or_create, on a fairly high traffic site. Our > production servers are running Django 1.2.5, but I don't see any changes in >

Re: help with Error was: No module named io

2011-08-28 Thread Jeremy Dunck
You've mailed the django-developers list which is for development *of Django itself*. The proper mailing list about using Django is django-users. Please send this message to django-users unless you're proposing a change to Django. http://groups.google.com/group/django-users On Sun, Aug 28,

Re: Resetting cache gracefully at the end of every test?

2011-07-01 Thread Jeremy Dunck
On Fri, Jul 1, 2011 at 12:27 PM, Jim Dalton <jim.dal...@gmail.com> wrote: > Awesome feedback, thanks. > > On Jul 1, 2011, at 10:01 AM, Jeremy Dunck wrote: > ... >> If I were to do this, I wouldn't have cache shared between tests or >> environments, so I'd be

Re: Resetting cache gracefully at the end of every test?

2011-07-01 Thread Jeremy Dunck
On Fri, Jul 1, 2011 at 10:54 AM, Jim D. wrote: > This issue came up again for me recently: Because the cache is not reset or > flushed after every test, cache values linger there. This can create > headaches when writing tests. > I would like to propose that we treat the

Re: Precedence in RequestContext processors

2011-06-30 Thread Jeremy Dunck
On Thu, Jun 30, 2011 at 3:51 PM, Michael Blume wrote: > First of all, I find it mildly odd that the context processor takes > precedence over the variable explicitly set, but that's obviously arguable. > Would it be possible for Django to kick up some kind of warning in

Re: Conditional aggregations.

2011-06-29 Thread Jeremy Dunck
On Wed, Jun 29, 2011 at 3:55 PM, Simon Riggs wrote: ... > I'm not sure I like your ORM syntax to generate that though. Why not > just pass through the case statement directly? That way *any* legal > CASE statement can be used, without inventing new ORM syntax each > time.

  1   2   3   4   5   6   >