Re: Pyramid 2 ideas

2011-03-13 Thread Wichert Akkerman
On 2011-3-14 02:11, Alice Bevan–McGregor wrote: i like ini files so much better than yaml. i realize it is brainstorming at this point, but is there any killer feature of yaml or something? Consider: [server:main] host = 127.0.0.1, ::1 port = 80, 8080 How do you get a list of ports as integer

Re: Pyramid 2 ideas

2011-03-13 Thread Wichert Akkerman
On 2011-3-14 01:53, Thomas G. Willis wrote: i like ini files so much better than yaml. Same for me. Wichert. -- Wichert AkkermanIt is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- You received this message because you are subscribed t

RESTful Pyramid

2011-03-13 Thread ZHUO Qiang
Hi All, I'm right now developing a new RESTful web service project using Pyramid. The problem is that there seems little info about how to do RESTful route in Pyramid (on the contrary there is pretty good support about how to build RESTful style web in both framework and document In Pylons).

Re: Pyramid 2 ideas

2011-03-13 Thread Andrey Popp
> Added to the list, but can you specify what exactly you want this > admin interface to do? What does "persistent" and "agnostic" mean in > an admin interface? Sorry, I mean persistence-agnostic -- interface should not be targeted to specific relational databases (like django.contrib.admin do), i

Re: Pyramid 2 ideas

2011-03-13 Thread Nathan
On 2011-03-13, at 5:29 AM, Mike Orr wrote: > Here's a summary of the ideas on the wiki page: > ... > - Possible new names for Paster and its components: glue ("Glue is the new > Paste!"), Create, Serve, karnak. Regarding names: A good name is unique enough that blog posts and discussion on it c

Re: Pyramid 2 ideas

2011-03-13 Thread Mike Orr
On Sun, Mar 13, 2011 at 1:40 PM, Andrey Popp <8may...@gmail.com> wrote: > Hello, > > On Mar 13, 2011, at 3:29 PM, Mike Orr wrote: >> - Replace the INI file with an YAML file? > > YAML is not as good as it can be for config file format: > >  * It has slow parsers. > >  * There's risk of bloating YAM

Re: Pyramid 2 ideas

2011-03-13 Thread Andrey Popp
Hello, On Mar 13, 2011, at 3:29 PM, Mike Orr wrote: > - Replace the INI file with an YAML file? YAML is not as good as it can be for config file format: * It has slow parsers. * There's risk of bloating YAML file with Python type annotations (tags), e.g. !!bool, !!python/tuple when deali

Re: Pyramid 2 ideas

2011-03-13 Thread Mike Orr
Added Marrow to the list. I looked over the components home pages and had two concerns: - marrow.server.http is asynchronous. I don't think we want to make such a large leap from multithreaded to asynchronous in the default server. People have just gotten used to making their apps thread-safe; I d

Re: Pyramid 2 ideas

2011-03-13 Thread Mike Orr
On Sun, Mar 13, 2011 at 11:08 AM, Alice Bevan–McGregor wrote: > Howdy! > >> - Port to Python 3.2 and 2.7. Drop compatibility with 2.5 and below. > > This is not just a good idea, it's the slaw; with the ratification of PEP > there finally exists a standard protocol for Python 3 support. > >>

Re: Pyramid 2 ideas

2011-03-13 Thread Mike Orr
On Sun, Mar 13, 2011 at 11:25 AM, Thomas G. Willis wrote: > thanks for the info. i guess I'm thinking if you need something to support > such a complex "configuration" that an ini file can't handle it, aren't you > programming at that point and if so, why not use a real programming > language? in

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Vlad K.
Perhaps I am missing something here but why would you serve static files from your Pyramid app? Why don't you serve the static files by the webserver directly? As for MongoDB, how about a wrapper around the pymongo classes/objects and use lazy connectors, ie. do the actual connection only if

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Chris Withers
On 13/03/2011 14:51, Chris Rossi wrote: If it were me I would attach a connection factory instead of an open connection. The factory would open a connection and stash it on the request the first time it is invoked and then just return the stashed connection on subsequent calls. This preserves t

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Chris Rossi
On Mar 13, 4:54 am, Seth wrote: > I was advised a while back by someone to throw my MongoDB connection call > into a pyramid.events.NewRequest subscriber. However, this has proven to be > a bad idea because the NewRequest subscriber gets called even if the request > is a static_route request, and

Re: Pyramid 2 ideas

2011-03-13 Thread Thomas G. Willis
thanks for the info. i guess I'm thinking if you need something to support such a complex "configuration" that an ini file can't handle it, aren't you programming at that point and if so, why not use a real programming language? in java they does this stuff all the time. I know that the line is

Re: Pyramid 2 ideas

2011-03-13 Thread Alice Bevan–McGregor
i like ini files so much better than yaml. i realize it is brainstorming at this point, but is there any killer feature of yaml or something? Consider: [server:main] host = 127.0.0.1, ::1 port = 80, 8080 How do you get a list of ports as integers? server: host: [127.0.0.1, ::1]

Re: Pyramid 2 ideas

2011-03-13 Thread Alice Bevan–McGregor
Howdy! - Port to Python 3.2 and 2.7. Drop compatibility with 2.5 and below. This is not just a good idea, it's the slaw; with the ratification of PEP there finally exists a standard protocol for Python 3 support. - Replace Paste, PasteDeploy, and PasteScript with "something". - "paste

Re: Pyramid 2 ideas

2011-03-13 Thread Thomas G. Willis
i like ini files so much better than yaml. i realize it is brainstorming at this point, but is there any killer feature of yaml or something? -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@goog

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Daniel Holth
In this case it only means "replace the function with its return value as a kind of cache" -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Jorgen Jorgensen
Damn(or hurrah), another new concept to learn - wikipedia: Reification (computer science), making a data model for a previously abstract concept I simply can't wait till the day when a day gets some more hours to it... fanx a lot! jj On Mon, Mar 14, 2011 at 1:02 AM, Michael Merickel wrote: > I'

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Jorgen Jorgensen
When failing to get it from the thread is that always because the connection is closed or could it also be because some other thread had locked the previously opened connection? On Sun, Mar 13, 2011 at 9:54 PM, Fernando Correa Neto wrote: > Hi > > On Sun, Mar 13, 2011 at 5:54 AM, Seth wrote: >

Re: Pyramid 2 ideas

2011-03-13 Thread Michael Merickel
http://www.plope.com/pyramid_auth_design_api_postmortem Michael On Sun, Mar 13, 2011 at 7:29 AM, Mike Orr wrote: > In discussing with chrism and Ian Bicking porting Pyramid to Python 3, > it became clear that we might want to do some other changes at the > same time, enough to warrant a new ma

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Michael Merickel
I've been a fan of tacking the connection onto the request object using @reify, thus if your request never calls "request.db" it doesn't have any db overhead. Thanks to reify, it reuses the same connection throughout that request. If you want to ensure that the connection is closed at the end of t

Re: WebOb 1.0.2 + request.copy() + os.fork() + hang

2011-03-13 Thread Daniel Holth
Got a unit test for the problem. According to hg bisect, The first bad revision is: changeset: 535:9b766e181f13 user:Sergey Schetinin date:Thu Feb 03 00:01:03 2011 +0200 summary: * refactor req.body to use .make_body_seekable() instead of duplicating the code -- You recei

Re: What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Fernando Correa Neto
Hi On Sun, Mar 13, 2011 at 5:54 AM, Seth wrote: [snip] > How are other people connecting to a db with high-traffic sites using > Pyramid and avoiding the static_route re-connection nonsense? Perhaps we > could request to get a matched_route object on the NewRequest event object? I usually try to

Pyramid 2 ideas

2011-03-13 Thread Mike Orr
In discussing with chrism and Ian Bicking porting Pyramid to Python 3, it became clear that we might want to do some other changes at the same time, enough to warrant a new major version, aka Pyramid 2. I've outlined the ideas on the following wiki page: https://github.com/Pylons/pyramid/wiki/P

What's the best way to optimize database connections in Pyramid?

2011-03-13 Thread Seth
I was advised a while back by someone to throw my MongoDB connection call into a pyramid.events.NewRequest subscriber. However, this has proven to be a bad idea because the NewRequest subscriber gets called even if the request is a static_route request, and since the event.request object in the

Re: Setting cookies in Pyramid for @action()s or HTTPFound redirects?

2011-03-13 Thread Seth
Thanks everyone! This has helped a ton. -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com.

Re: New project . Pylons or Pyramid

2011-03-13 Thread Eric Ongerth
+1. If I chose Pylons over Django and TurboGears (not to mention Rails) for its flexibility, light weight, and pluggability, Pyramid offers more of those qualities than Pylons and with better docs, plus built-in authorization/authentication support rather than the Pylons situation with that. On