Re: Combine localflavor apps again

2013-05-23 Thread Jannis Leidel

On 21.05.2013, at 15:06, Aymeric Augustin  
wrote:

> 2013/5/21 Jannis Leidel 
> I'd like propose to combine all the django-localflavor-* packages - that were 
> moved out of contrib a while ago - into a new "django-localflavor" package. 
> None of the current maintainers would lose the commit bit. I'm ready to do 
> the heavy lifting for that.
> 
> I'd love to see localflavor in a better shape, even though I don't have 
> strong opinions on what should be done.
> 
> The situation would certainly be less dire if we had looked for maintainers. 
> Did we say clearly that we wanted to hand over the repositories to local 
> maintainers?
> 
> Merging the repositories again will require a non-negligible amount of work 
> and a second migration for users who already started using 
> django_localflavor_xx.
> 
> However, if you're convinced that's the right thing to do at this point, I 
> don't oppose that move. It would help maintain best practices, especially 
> wrt. backwards-compatibility and testing.

Agreed, the maintenance policy would be along the lines of what Django does, 
but it wouldn't be hard-locked into Django's release cycle. In case there would 
be changes in Django that require a backwards-incompatible change localflavor 
ought to support both APIs (as long as the old API is in a maintained version 
of Django).

Jannis


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Combine localflavor apps again

2013-05-23 Thread Jannis Leidel

On 21.05.2013, at 20:00, ptone  wrote:

> 
> 
> On Tuesday, May 21, 2013 5:51:11 AM UTC-7, Jannis Leidel wrote:
> Hi all, 
> 
> I'd like propose to combine all the django-localflavor-* packages - that were 
> moved out of contrib a while ago - into a new "django-localflavor" package. 
> None of the current maintainers would lose the commit bit. I'm ready to do 
> the heavy lifting for that. 
> 
> 
>  
> 
> What do you think? 
> 
> Clearly the current fragmentation has proven unworkable, so I think there is 
> only upside in trying this approach.
> 
> I think there needs to be someone who will coordinate the version bumps and 
> releases to PyPI  - perhaps just document that it will be released n times 
> per year on dates a, b, c, d - and just roll whatever changes make it in by 
> those dates? Maybe you are volunteering for that as well ;-)

Oh, I am indeed volunteering to do the initial re-combination and act as 
release manager afterwards. I'm not a huge fan of forced time based releases, 
but I can't see another good indicator to do a release except "when needed". 
I'll know better once I have a better picture of the changes that were made to 
the localflavors in the recent months.

Jannis 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Predicate as suggested new feature to extend url resolver process

2013-05-23 Thread Rach Belaid
Hi Jacob,

I understand your points. Sorry if my initial post was not properly
fitted.
Thanks for taking the time to clarify this points.

I was maybe not clear enough or got lost in translation in my post/
ticket/pr.
but I tried to specify my intention in all of them:

"I'm personally not convince my implementation is the right one but I
hope
that could open the discussion to have a more extensible routing in
Django."


About 1. I'm aware that Django has a specific way of doing thing and
I'm sorry if it has been understood in the
way that Framework x does that or look better. Not my intention to
start a debat X better than Y ... it's just a tool at end of day.
I try to have a rational approach so I checked how people was already
solving this problem.
I was more referring to them as a doc reference because predicate is
not an easy concept to understand.

Personally, I wanted to open a discussion and I got it so I'm fine and
happy with any resulting solution.

Agreed that predicate is maybe (probably) not a way to go for Django.
But I tried initially to do that as a third party and I couldn't find
a way to
figure it out with having access to the request.
But probably because of my lack of understanding about how the url
routing works.

Based on the point 3 ?

Could we imagine being able to swapping via a settings the class used
for the UrlResolving Process.
For people being able to build their own in the same spirit of the
backends.

I'm glad to read "it should be
easier to add these sorts of things if you choose *without* needing to
add something new to Django."

Because that was my initial intention to offer a easy way to extend
the routing without
any understanding of how the url resolving process works.


Let me try an other approach to my proposition:
==

Problem:  The RegexURLResolver is too complex and monolithic for
people understanding or extending it. It comes with some issues:
It don't allow to be swapped (from what I'm aware) or don't provide
any hooks to help people to extend the logic.

Solution :  ** Something **


My Solution :  Predicates


To not come empty handed, I propose a solution based on the concept of
predicate that I have seen in other framework (sorry for that).
Why I'm bringing that from somewhere else. Because I was lazy and
didn't want to invent a new concept when this one was heavily
documented already.

Is predicate solve the problem?
---

Yes but probably create others as @Sean highlighted. Touching the
RegexURLResolver is complex but writing a test function is easy.

signin = lambda r : 'signin' in r.POST
signup = lambda r : 'signup' in r.POST


Opinion:


I'm not convince that predicate is the right implementation for django
and I'm sure that the core dev will come with a much better idea to
this current problem.

===End


Thanks @Jacob @Sean for taking the time to answer me and giving
feedbacks.
I'll check how did with https://github.com/jacobian/django-multiurl
and try to can come with
a 3rd party solution.








On May 23, 4:22 am, Jacob Kaplan-Moss  wrote:
> Hi Rach --
>
> Thanks for the clarification. I'd like to make three broader points.
> They may not seem like they're directly addressing your proposal, but
> stick with me, I promise this comes together to your specific proposal
> at the end:
>
> 1. "But framework X does it like this" isn't a particularly good
> argument for why *Django* should do something. Yes, it's important to
> understand and follow what's going on in the greater web world, and
> yes it's important to beg, borrow, and steal good ideas. But you have
> to articulate why an idea is *good for Django*. After all, if we
> wanted to be just like Framework X, we'd all just be using Framework
> X. In many ways the high quality of our competitors actually frees us
> up to be *more* skeptical of what we add to Django. We don't *need* to
> be more like other frameworks because those other frameworks are
> usually *great* -- if you like them, you should use them! We should be
> focusing on doing the things we're good at. Let Django be Django.
>
> 2. One of the really high bars you have to clear when you propose new
> things for Django is the bar of utility. It's not good enough to
> demonstrate that something's a good idea. It's not good enough to
> demonstrate that it solves your problem. It's not even good enough to
> demonstrate that it solves some bigger problem. You have to
> demonstrate that what you're proposing is so useful that a sizable
> portion of people using Django would be excited by your new thing. One
> of Django's real strengths is its stability, but the cost of that
> strength is that we say "no" a lot.
>
> 3. Flexibility is a very important goal. Our philosophy of "sensible
> defaults" doesn't mean that the default choice should be the only
> choice! It means that we should provide a reasonable default for most
> people, but then give 

Re: Passing parameters to raw()

2013-05-23 Thread Russell Keith-Magee
On Thu, May 23, 2013 at 2:19 PM, VernonCole  wrote:

>
> Officially (according to PEP-249) you are not supposed to be able to do
> that (pass a dictionary  of parameters), but PostgreSQL does it as an
> extension to the spec.
>

Are you sure about this?

http://www.python.org/dev/peps/pep-0249/#paramstyle

lists 5 officially supported paramstyle formats, including pyformat, and
"numeric", "named" and "pyformat" are specifically listed as preferred
formats (ironically, leaving qmark and format, the most common options in
practice, as less preferred by the standard).

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.