Re: SQLAHelper status
Hi That fix is to 2.0 branch. Also that can apply to 1.0, but this fix changes behavior of ``add_engine``, so I don't. I'm using sqlahelper heavyly, and I'v expected 2.0 release too. Thus, I gonna maintain sqlahelper. Can I get permission, move to pyramid-collective? 2012年5月16日水曜日 Eric Lemoine eric.lemo...@camptocamp.com: On Wednesday, May 16, 2012, Mike Orr wrote: I put a notice in the SQLAHelper README that it's under a maintenance freeze. I merged a patch by aodag Did this patch make it into the “version 1” branch? If so would it make sense to make a bug fix release? FWIW, we still use SQLAHelper here, but I guess we could quite easily drop it. We still have like module interdependency issues but I guess this is bad design on our side. Thanks for the notice. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com javascript:_e({}, 'cvml', 'eric.lemo...@camptocamp.com'); http://www.camptocamp.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.comjavascript:_e({}, 'cvml', 'pylons-discuss@googlegroups.com'); . To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'pylons-discuss%2bunsubscr...@googlegroups.com');. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- /* Atsushi Odagiri http://blog.aodag.jp mailto:aod...@gmail.com */ -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Writing configuration decoration?
Hi, I find myself in need to write a custom configuration decoration that would mark a resource to be included in config during a scan(). Quite surprisingly, the only configuration decoration (needed a special term in glossary) in Pyramid seems to be pyramid.view.view_config. I've looked into it, as well as pyramid_handlers.action. Both look different in what they do and I suspect what actually matters is how they are called. Can anyone offer explanation on this process? A guidance on how to write a simple configuration decoration myself would be appreciated, too. Regards, Peter -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: SQLAHelper status
i've been experimented with a replacement for a few months: https://github.com/jvanasco/pyramid_sqlassist it does what sqlahelper does, but is rewritten quite a bit ( and experimental ) to get the following done: - reflect tables - support multiple database connections it seems to work correctly right now, but i don't have it on anything mission-critical yet. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Writing configuration decoration?
The way Pyramid thinks about decorators is that when the decorator's callback is invoked upon scan, the configurator object is passed into the callback. From there you can do what you need to do via config or config.registry or config.registry.settings, etc. The simplest way to setup decorators is to create a new directive on the configurator which does what you want imperatively. Then just have the decorator call that. For example, @view_config simply calls config.add_view(). This keeps view_config very focused only on decorator logic and not how to add views. For direction on writing a decorator like view_config just look at config.add_directive and the view_config implementation (after reading how venusian works). Yeah the docs could probably be improved here. Below are the two links I know of in the docs which should get you started. http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/hooks.html#registering-configuration-decorators http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/extconfig.html#adding-methods-to-the-configurator-via-add-directive The @action decorator in pyramid_handlers is different because it is not found at scan-time. Rather, when you call add_handler(MyHandler), the class methods are scanned for @action decorators. HTH, Michael On Wed, May 16, 2012 at 7:05 AM, Peter Hartmann mailbox@gmail.com wrote: Hi, I find myself in need to write a custom configuration decoration that would mark a resource to be included in config during a scan(). Quite surprisingly, the only configuration decoration (needed a special term in glossary) in Pyramid seems to be pyramid.view.view_config. I've looked into it, as well as pyramid_handlers.action. Both look different in what they do and I suspect what actually matters is how they are called. Can anyone offer explanation on this process? A guidance on how to write a simple configuration decoration myself would be appreciated, too. Regards, Peter -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: SQLAHelper status
Oh, the second project already exists. https://github.com/pyramid-collective/pyramid-collective.github.com I've submitted a pull request to create a SQLAHelper repository. When it's ready I'll upload the existing repository to it, and then you can add yourself as an owner and I'll delete the repository in Pyramid. On Wed, May 16, 2012 at 3:18 AM, Atsushi Odagiri aod...@gmail.com wrote: Hi That fix is to 2.0 branch. Also that can apply to 1.0, but this fix changes behavior of ``add_engine``, so I don't. I'm using sqlahelper heavyly, and I'v expected 2.0 release too. Thus, I gonna maintain sqlahelper. Can I get permission, move to pyramid-collective? 2012年5月16日水曜日 Eric Lemoine eric.lemo...@camptocamp.com: On Wednesday, May 16, 2012, Mike Orr wrote: I put a notice in the SQLAHelper README that it's under a maintenance freeze. I merged a patch by aodag Did this patch make it into the “version 1” branch? If so would it make sense to make a bug fix release? FWIW, we still use SQLAHelper here, but I guess we could quite easily drop it. We still have like module interdependency issues but I guess this is bad design on our side. Thanks for the notice. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- /* Atsushi Odagiri http://blog.aodag.jp mailto:aod...@gmail.com */ -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- Mike Orr sluggos...@gmail.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Allowing authentication to work over multiple subdomains?
Hey folks, we have a pyramid app that responds to multiple subdomains and routes accordingly, with the account being chosen based on the subdomain but all code running through the same engine http://iain.cloudapp.com - app knows to return Iain's data http://snufkin.cloudapp.com - app knows to use snufkin's data Accounts can allow access to other account's if the user has been given that privilege. IE, Iain should be able to login, work on iain.cloudapp.com, and switch to glyn.cloudapp.com if he's allowed, but *without* having to login again. Iain should be able to login by either going to www.cloudapp.com or iain.cloudapp.com. We're using the default pyramid authentication system, and as it is out of the box, if I switch subdomains I'm not treated as logged in. Can anyone point me in the right direction for making the auth system consider all subdomains of cloudapp.com act like the same domain? thanks! Iain -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: SQLAHelper status
On Tue, May 15, 2012 at 10:45 PM, Eric Lemoine eric.lemo...@camptocamp.com wrote: Did this patch make it into the “version 1” branch? If so would it make sense to make a bug fix release? There's only one branch, 'master'. Version 1 is the 'v1.0' tag. The next maintainer can make a version 1 branch from that if he wishes. FWIW, we still use SQLAHelper here, but I guess we could quite easily drop it. We still have like module interdependency issues but I guess this is bad design on our side. You could put the Session and Base in a 'meta' module that is not a parent of the other model modules and does not import them, as Pylons does. The Pyramid default just puts them in the top level in the model. This sometimes works and sometimes doesn't, depending on what other global code is in your modules and whether it's above or below the import statements. If you do stick with SQLAHelper I'd suggest using the version 2 API, which is more straightforward and has fewer getters/setters. -- Mike Orr sluggos...@gmail.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: SQLAHelper status
On Wed, May 16, 2012 at 9:59 PM, Mike Orr sluggos...@gmail.com wrote: On Tue, May 15, 2012 at 10:45 PM, Eric Lemoine eric.lemo...@camptocamp.com wrote: Did this patch make it into the “version 1” branch? If so would it make sense to make a bug fix release? There's only one branch, 'master'. Version 1 is the 'v1.0' tag. The next maintainer can make a version 1 branch from that if he wishes. FWIW, we still use SQLAHelper here, but I guess we could quite easily drop it. We still have like module interdependency issues but I guess this is bad design on our side. You could put the Session and Base in a 'meta' module that is not a parent of the other model modules and does not import them, as Pylons does. The Pyramid default just puts them in the top level in the model. This sometimes works and sometimes doesn't, depending on what other global code is in your modules and whether it's above or below the import statements. If you do stick with SQLAHelper I'd suggest using the version 2 API, which is more straightforward and has fewer getters/setters. Thanks Mike. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Allowing authentication to work over multiple subdomains?
On Wednesday, May 16, 2012 3:36:15 PM UTC-4, Iain Duncan wrote: Hey folks, we have a pyramid app that responds to multiple subdomains and routes accordingly, with the account being chosen based on the subdomain but all code running through the same engine http://iain.cloudapp.com - app knows to return Iain's data http://snufkin.cloudapp.com - app knows to use snufkin's data Accounts can allow access to other account's if the user has been given that privilege. IE, Iain should be able to login, work on iain.cloudapp.com, and switch to glyn.cloudapp.com if he's allowed, but *without* having to login again. Iain should be able to login by either going to www.cloudapp.com or iain.cloudapp.com. We're using the default pyramid authentication system, and as it is out of the box, if I switch subdomains I'm not treated as logged in. Can anyone point me in the right direction for making the auth system consider all subdomains of cloudapp.com act like the same domain? thanks! Iain Pyramids auth ticket implementation sets the auth cookie on *.example.com and example.com In order for it to work across subdomains it must also set the auth cookie on .example.com (notice leading dot). I had to create a custom authentication policy to do this. There is a closed pull request that outlines the required changes, see the pylons-devel thread about it at https://groups.google.com/forum/?fromgroups#!topic/pylons-devel/Z8sUxc9QOaM -- Jason -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/CdFAdjg9CY0J. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: SQLAHelper status
Hi I confirmed collective repository. And clone/pushed from Pylons repository to collective. https://github.com/pyramid-collective/SQLAHelper Thanks 2012/5/17 Mike Orr sluggos...@gmail.com Oh, the second project already exists. https://github.com/pyramid-collective/pyramid-collective.github.com I've submitted a pull request to create a SQLAHelper repository. When it's ready I'll upload the existing repository to it, and then you can add yourself as an owner and I'll delete the repository in Pyramid. On Wed, May 16, 2012 at 3:18 AM, Atsushi Odagiri aod...@gmail.com wrote: Hi That fix is to 2.0 branch. Also that can apply to 1.0, but this fix changes behavior of ``add_engine``, so I don't. I'm using sqlahelper heavyly, and I'v expected 2.0 release too. Thus, I gonna maintain sqlahelper. Can I get permission, move to pyramid-collective? 2012年5月16日水曜日 Eric Lemoine eric.lemo...@camptocamp.com: On Wednesday, May 16, 2012, Mike Orr wrote: I put a notice in the SQLAHelper README that it's under a maintenance freeze. I merged a patch by aodag Did this patch make it into the “version 1” branch? If so would it make sense to make a bug fix release? FWIW, we still use SQLAHelper here, but I guess we could quite easily drop it. We still have like module interdependency issues but I guess this is bad design on our side. Thanks for the notice. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- /* Atsushi Odagiri http://blog.aodag.jp mailto:aod...@gmail.com */ -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- Mike Orr sluggos...@gmail.com -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- /* Atsushi Odagiri http://blog.aodag.jp mailto:aod...@gmail.com */ -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Memory profiling a Pyramid app
How? Which tools? I'm trying to use heapy but I'm fighting both with lack of proper documentation, and with the fact that I need to profile a wsgi app run behind uwsgi. Even if I run with pserve (1.3) I have no idea how to use heapy's interactive features. What else would you suggest to memory profile an app? Preferably with simple but effective statistics of heapy (count, % count, size, % size and cumulative)? Thanks. -- .oO V Oo. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.