[pylons-discuss] Re: Can waitress replace mongoose in a python web app?
On 2/5/19 3:38 PM, Stuart wrote: > I have installed waitress with pip install on windows 7 using Python 3.7.0. > After opening a command window and running python the command 'from > waitress import serve' seemed to run ok. > The command "serve(python.exe, listen='*:8080')" results in name "python' > is not defined" so not sure what to enter for wsgiapp 'wsgiapp' should be any callable which conforms to PEP 's definition for an application[1]. WSGI-based web frameworks aim to make writing that callable simpler, by hiding the details of the WSGI spec. See for instance the "simplest possible Pyramid application"[2], or the equivalent Flask application[3]. [1] https://www.python.org/dev/peps/pep-/#the-application-framework-side [2] https://pyramid.readthedocs.io/en/latest/#the-pyramid-web-framework [3] http://flask.pocoo.org/ Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/d38bec78-4bb6-0a4a-1261-839301af6ee8%40palladion.com. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Store class at process start, and use it to initiate inside function?
On 10/09/2018 02:00 AM, Thierry Florac wrote: > And how do you handle such use case when working in a multi-process / > multi-hosts cluster configuration? Fork first, then run the configure step. Forking before creating stateful globals is considered best practice for multi-processing. Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/ppij6f%24ol3%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Ethical Ads on Pylons Project documentation
On 09/19/2018 07:54 AM, Steve Piercy wrote: > Howdy Everyone, > > I'd like to get your feedback—either here in the group, by > personal email, or IRC—on whether the Pylons Project and all > of its projects with documentation built and hosted by Read The > Docs for free should display Ethical Ads. More information > about Ethical Ads is available on the RTD website. > > https://docs.readthedocs.io/en/latest/advertising/ethical-advertising.html > > Currently the Pyramid, Pylons, and PylonsFW Sphinx themes do not > support ads. > > https://docs.pylonsproject.org/projects/pyramid/en/latest/ > > Some projects, including WebOb, display ads because they use the > Alabaster Sphinx theme. > > https://docs.pylonsproject.org/projects/webob/en/latest/ > > Please let me know your thoughts. Thank you! I'm fine with RTD's ethical adds on any Pylons-project RTD docs. Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/pntgr5%24uun%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Reading a Zope ZODB from Pyramid?
On 07/30/2018 12:01 PM, Laurent DAVERIO wrote: > this may be a very silly question, and if so I apologize in advance, but > I'm not sure what to google. > > Is it reasonable to try and read data from the ZODB of a Zope/CMF > instance directly from Pyramid, or should I write export routines in the > Zope app? If you install all the Zope + CMF code such that it is importable from within your Pyramid app, then you could just load the objects normally (unpickling requires finding the class) Reading pickle data (vs unpickling the instances) is a tricky problem, and not one I'd be excited to tackle. Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/pjndkd%241jv%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: GraphQL and pyramid
On 05/09/2018 08:16 PM, Lukasz Szybalski wrote: > Hello, > Are there any examples on how to create a GraphQL endpoint in pyramid > project that was created using pyramid-cookiecutter-alchemy > > config.add_route('api_graphql', '/api/graphql') > > > > @view_config(route_name='api_graphql', renderer='json') > def api_graphql(request): > """?.""" > return I don't know from graphql. Looking at the "Python server library" link on graphql.org[1], it looks like you would define a graphene query class, and then use it to respond to a JSON POST request[2]: -- %< -- import graphene class Query(graphene.ObjectType): hello = graphene.String() def resolve_hello(self, args, context, info): return 'Hello world!' schema = graphene.Schema(query=Query) @view_config(route_name='api_graphql', method='POST', renderer='json') def api_graphql(request): json_body = request.json_body query = json_body['query'] variables = json_body.get('variables', {} return schema.execute(query, variable_values=variables) -- %< -- [1] https://graphql.org/code/#python [2] http://graphql.org/learn/serving-over-http/#post-request Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/pd1q9o%24efh%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid + SQLAlchemy + PostgreSQL: idle connections
On 04/02/2018 01:16 PM, Jonathan Vanasco wrote: >> Where is the forking happening in a normal Pyramid app? After the main >> function finishes / "return config.make_wsgi_app()"? >> > Somewhere after there, i believe. It depends on the server. uwsgi and > unicorn do it in different places. i think waitress essentially does it > too. Waitress is not a forking implementation: it uses threads. Tres. -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/pafn5a%24bfm%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: pyramid webdav example?
On 12/11/2017 08:28 PM, jens.troeger wrote: > This question is somewhat dated and still unanswered. > > I’d like to renew it though: has anybody in the meantime been playing > around with WebDAV <https://en.wikipedia.org/wiki/WebDAV> (or its derivates > CalDAV <https://en.wikipedia.org/wiki/CalDAV> and CardDAV > <https://en.wikipedia.org/wiki/CardDAV>), maybe added the additional verbs > perhaps in a Cornice <https://github.com/Cornices/cornice>-like fashion? Or > any other experience implementing WebDAV with Pyramid? > > Initial googling, binging, yahooing hasn’t brought up anything noticeable. > > Thanks! > > > > On Tuesday, May 19, 2015 at 7:41:53 AM UTC+10, kris wrote: >> >> >> Anybody have a quick webdav server written with pyramid? There isn't any such thing as a "quick webdav server." At the level of Pyramid itself, there is nothing extra really needed (PYramid already allows binding views to arbitrary HTTP methods, for instance). Pyarmid *applications* might care about / enable WebDAV. I have a never-polished-for-release add-on for SubstanceD[1], but the problem is tightly coupled to the application domain. E.g., where do the resource representations come from? What back-end storage is used? How much of the WebDAV spec do we need to implement? [1] http://git.agendaless.com/gitweb/?p=sddav.git Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/p1e11h%24deq%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: content_type application/problem+json
On 11/14/2017 09:25 AM, webmas...@johlia.de wrote: > I have a pyramid application. How can I change the content_type to > problem+json (as defined in: https://tools.ietf.org/html/rfc7807#page-9) Interesting -- thanks for pointing that out! I'd never come across that RFC before. > My code looks like this: > from pyramid.httpexceptions import HTTPNotFound > def error_handler(self, message): > response = HTTPNotFound() > response.body = dumps({'message': message}) > response.content_type = 'application/json' > raise response > > Changing the content_type to application/problem+json doesn't work. 'HTTPExecption.prepare'[1] is overriding that content type based on the 'Accept:' header detection. Making that method aware of possible extension types seems like a reasonable choice: the fastest way to get that in place would be a pull request with tests. In the meanwhile, ISTM that you'll either need to monkey-patch 'HTTPResponse.prepare' or else stop using exception types which derive from 'HTTPException'. E.g.: from pyramid.response import Response class ProblemResponse(Response, Exception): pass def error_handler(self, message): raise ProblemResponse( body=dumps({'message': message}, status='404 Not Found', content_type = 'application/problem+json', ) [1]https://github.com/Pylons/pyramid/blob/cc6a6ed60260b0391aa38f372b26311d58edf0d6/pyramid/httpexceptions.py#L248-L316 Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/ouhl59%242cf%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Distributing a REST API Pyramid project
On 09/29/2017 03:34 AM, Jimmy Thrasibule wrote: > Now come the hard part. Our team is too small to get the project > divided in multiple sub-projects and I would also like to keep > distribution as simple as possible meaning keeping only one > ``setup.py`` so that with one ``./setup.py bdist``, I can create > **all** the packages I need to distribute the project. > > And indeed I'd like to have multiple packages for this one project so > I can install only the required dependencies for each subsystem. In > the end, I'd like to get a distribution package for the following: > > * myproj.common > * myproj.data > * myproj.server > * myproj.tasks.common > * myproj.tasks.task1 > * myproj.tasks.task2 > > Any idea how I can get this far keeping the overall project management > as simple as possible? The simplest solution: assuming this is a purely "bespoke" project (only your team runs the app), I would just ditch the "install only required dependencies" bit: the size of the software load should be minimal on a modern system, and keeping the hosts / VMS interchangeable makes for a more flexible deployment. If you really cannot do that, then 'setup.py' can contain multiple invocations of the 'setuptools.setup()' function, once for each separate sdist / wheel you want to build ('bdist' support is already deprecated in modern setuptools, and pip has never been able to install those artifacts). Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/oqll1b%24uo1%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: gevent/sqlalchemy/psycopg2/gunicorn setup?
On 08/31/2017 10:51 AM, Zsolt Ero wrote: > Ok, I suspected it but I'm really puzzled then why does Mike Bayer > recommends it? Is concurrency under Python really such an impossible task? > > With asyncio / twisted I pretty much cannot use any of my existing code and > any of the common libraries. They all need their own tx/aio version. No > more import antigravity. SQLAlchemy ORM is one thing which doesn't exist > under those worlds. > > Also, the second part is the programming style. If I were to write using > that async style, I'd just write in Javascript, at least in the Node.js > ecosystem every library is designed to work in an async environment. So you > don't have to use ORM's with 47 Github stars > (https://github.com/fantix/gino) but one with 10.000 > (https://github.com/sequelize/sequelize). > > So how do you solve slow HTTP endpoints with Pyramid? Just start a lot of > workers in a server with lots of RAM? Mike isn't a big fan of asyncio for RDBMS stuff. E.g., here is his latest relevant tweet[1]: > I can't stress enough how inappropriate async IO is for database > connections. Just spent 8 hrs diagnosing a timeout due to CPU bound ops [1] https://twitter.com/zzzeek/status/900768397637668865 Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/oo9t20%24mi4%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid 1.9 released
On 06/27/2017 01:22 AM, Michael Merickel wrote: > Hey folks, I'm happy to announce Pyramid 1.9! This is the first officially > supported release in the 1.9 series and marks the end of support for the > 1.7 series. As always, the 1.8 series continues to be supported until at > least the next major release. > > There are no major changes in this release from 1.9b1 - however we finally > updated the documentation to work over HTTPS! > > Please view the list of changes from 1.9b1 at > https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/changes.html#id1 > . > > A comprehensive "What's New In Pyramid 1.9" document exists at > https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch > /whatsnew-1.9.html . > > You will be able to see the 1.9 release documentation > at https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/ . > > You can install it via PyPI: > > pip install pyramid==1.9 > > Enjoy, and please report any issues you find to the issue tracker at > https://github.com/Pylons/pyramid/issues > > Thanks! Thanks to all who work to make Pyramid a great project! One note of historical interest: next week marks the 9th anniversary of the initial repoze.bfg release: $ tail -6 repoze.bfg-trunk/HISTORY.txt 0.1 (2008-07-08) - Initial release. Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/oiue0h%24u1e%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Anyone going to pycon?
On 05/17/2017 10:55 PM, Mike Orr wrote: > I'll be there. Where is the place to be at PyCon? > > On Tue, May 16, 2017 at 3:00 PM, Dan wrote: >> Let me know, and I'd like to buy you some sort of drink. I will be there Sunday through Tuesday. Tres. -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/ofkjf7%24j29%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Feedback needed from Agendaless Consulting on copyright, trademark, etc issues
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/14/2017 05:41 PM, Andrey Tretyakov wrote: > On Sunday, May 14, 2017 at 11:14:10 PM UTC+8, Tres Seaver wrote: >> >> That would be your choice. The contributor agreement leaves intact >> your rights to your own contributions (you assign a half interest in >> the copyright, not the whole thing), and allows you to use the >> entire work under a permissive license. >> > IANAA, does it mean I retain full rights of my copy of the commit > (including right to relicense my copy) and Agendaless has the same > rights but to the commit itself ? You could indeed relicense your code. What you cannot do is change the license to the code as it exists within the repository: it will remain under the same license as the larger body of code. >> The point of the half assignment is to allow for a relicensing of >> the work, should such be required, without having to find and get >> agreement from dozens / hundreds of contributors. >> > > It is still unclear why would you need to change the license ? Many > projects pick a license once and keep using it without any issues. The > act of signing the agreement would just assure the non-revocable > nature of the commit, and everybody would have peace of mind. The ability to reclicense the code is an escape hatch for problems created by (hypothetical) future shifts in the legal / regulatory climate. Projects (e.g., the Linux kernel) which do *not* have a unitary owner capable of relicensing are indeed stuck with the initial license, even if issues arise with how it is interpreted in various jurisdictions around the world. >> We have had a number of discussions of the issue over the years, >> including talks with the SFC. There is no plan currently in place: >> it would require setting up a Pylons-project-specific organization, >> which would depend on having community members devote non-trivial >> amounts of effort to create and sustain it. >> > Why would it require pylons-specific org ? There are even 1-man > projects under the umbrella of SFC for example The discussions which project members had with the SFC did not bear fruit in the past, which isn't to say they couldn't be restarted: only that *I* (and Paul and Chris) won't be driving them. One sticking point was that there are literally scores of repositories under the `Pylons` and `repoze` organizations on Github, all published under the same license and using the same contribution regime. That meant that the "adopt a repository" model already pioneered by SFC for other projects did not work. >> None of the partners at Agendaless oppose the creation of such an >> organization, but none of us has the bandwidth / interest to drive >> its creation, either. If the community does get such an organiztion >> created, Agendaless will be pleased to transfer its copyrights in >> the Pylons / repoze software to it, assuming that the organization's >> bylaws were reasonable (a promise that the software would continue >> to be available under a simliarly-permissive license would be the >> only requirement I can think of now). >> > That is nice to hear > > Contributions will continue to require assignment of half interest. >> Should the hypothetical organization come into being, all that would >> change would be the target of that assignment. >> > But if there will be no umbrella foundation, it means the issue will > never be fixed, which is very disappointing. The current situation > promotes forking instead of contribution Only for the subset of the community who are too suspicious of Agendaless' stewardship of the code. Forks incur serious engineering costs over time, compared to collaboration: in my view, forking is a clear lose for both parties, compared to the (vanishingly tiny) risk that Agendaless would somehow do Something Evil(TM) with the code in the future. For one thing, iven the permissive license, *anybody* can do Something Evil with the code: that is just the nature of the beast. Tres. - -- - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJZGO9xAAoJEPKpaDSJE9HYxaIP/20bbVoc4OnE8yNCBOkWIrvX hNyrBsortKACcYvndy3pq4jam8w8qdffmZZ1pBu9No+Nb0GpO7Xos7pleojH0qkX oImmVcZzj9LWVKXsPGJ8UYwxKyG4eyma0jXxhQtIFar0FUkxabsLvmAxcIqPjN/f XOQlCftuGhsnDjd4nhLZqvIjEx281BYkVuDM7HumURuCEjPNDt+J1HH0NHRb1nJi J9IRNNOdcZtLXmLu0WDyWlEYOM3u5pY3VriCGInP5iSm/cRzboKKYUrd2vOvmQ2s C9EzZPgoS0qoUL0arHUqxNVMZlFwqmyiZXt7GwzqNQUKqLcclB+7bFNK3yzz
[pylons-discuss] Re: Feedback needed from Agendaless Consulting on copyright, trademark, etc issues
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/13/2017 07:44 PM, Andrey Tretyakov wrote: > Regarding Pylons Contributors Agreement. I see it as it's against the > spirit of free software. I am ok with RPL and liberal licenses in > general, don't confuse me with GPL zealots, but signing rights > transfer to a corporate entity would be against my principles, unless > it is a non-commercial entity with open and transparent governing > process. That would be your choice. The contributor agreement leaves intact your rights to your own contributions (you assign a half interest in the copyright, not the whole thing), and allows you to use the entire work under a permissive license. The point of the half assignment is to allow for a relicensing of the work, should such be required, without having to find and get agreement from dozens / hundreds of contributors. > I am sure that PCA is a serious barrier preventing many people from > contributing to the Pyramid project. There is also related issue that > (c) Agendaless Consulting copyright notice is present on the > trypyramid.com website. Corporate copyright notice on a community > website is a really bad idea in my opinion. > > People mentioned that there was a discussion on transfer of all > copyright (if needed), branding and trademark (if any) to umbrella > non-commercial foundation. So what is your official stance on this ? > What is the current status of the transferral, if any is planned ? We have had a number of discussions of the issue over the years, including talks with the SFC. There is no plan currently in place: it would require setting up a Pylons-project-specific organization, which would depend on having community members devote non-trivial amounts of effort to create and sustain it. None of the partners at Agendaless oppose the creation of such an organization, but none of us has the bandwidth / interest to drive its creation, either. If the community does get such an organiztion created, Agendaless will be pleased to transfer its copyrights in the Pylons / repoze software to it, assuming that the organization's bylaws were reasonable (a promise that the software would continue to be available under a simliarly-permissive license would be the only requirement I can think of now). > I think (depending on laws) some form of agreement could be needed, > but is there any chance that transfer of rights will not be required > ? Contributions will continue to require assignment of half interest. Should the hypothetical organization come into being, all that would change would be the target of that assignment. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJZGHQhAAoJEPKpaDSJE9HY+6QP/0omevgkvY/xt/hb/mZj+TxA caKJ5wFbK1H0PKW2kkwGumdliER7b+UsoNhJg+gGG+sENs96FDVN0Ds5I2j7h/Ze 99BCMP0lhqbcq7jrdnbQKSa3BihOSb50u7/JVg2ivBM0otiTimd/vCUciVd2Z0Od bnfjLRttN+9Dk+Y2A6T0FTbuZeHzB7g7EuAmxFAEAGdng/znBz+R7Gs2Fo1P80p6 ZR7lA/CenddgqHy6UvEht7EJ4sgt0LvPBTTD2MqCl3vsZzt5VfW3WJ1DmgFHzpux OxBxhcRK1iE8jNgDbLdwQP5NW//8ssJSmyyTUcLGzRoXtCJsrDidKfobmB0GPn1d g0+qRdNLHCHxdYRbO70eMgWDXqrqYnxy7WZHq14ufcfp3LWAIp9qAv42tKwSU+yR 2TXcH2VQ5RRNO2FdknD/hf9JMjR8DfrrVhhv8kLgkdvbWc0Z/1wOpwr72LrMlr+t AJIIJZ2CISPxIv+ytx/nwC1Q3bsYjFkHfvVaI7g7SHBJXGIbYzvSchXoKb0DnwGP 4KdcAZZNUnWo0DOEzc5+08GHSWvQpL1yOCR4marmLkggpdeKsSf0B1FePQlKGTRQ tIZBYPcUA5u3StoNIJwZ4SiSUcxI1LP8taBglClBwqJZKWBBuoOL7eb7hYOYNiBZ CJIy80HQYgRamC3pKqXe =Zrlp -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/of9s78%24s6v%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Problem with Pyramid 1.8 and pdb session
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/15/2017 02:34 PM, Lele Gaifax wrote: > Lele Gaifax writes: > >> If I switch back to the master branch[3], reinstall its >> requirements.txt (thus running with Pyramid 1.6.1, waitress 0.9.0 >> and no hupper) and repeat the session, none of the above non-sense >> happens! > > Uhm, now I'm really confused: going on with the investigation, I was > eventually able to obtain the same "multiple sessions" even with > Pyramid 1.6, and effectively a "ps H" shows that pserve starts four > threads... I'm ashamed I never noticed this! :-\ > > Anyway, for some strange reason, the interactive pdb session I get > with 1.6 is /almost/ usable (the fact that I never noticed the issue > before supports that), while under 1.8 it's always impeded... > > Well, I won't give up the investigation :-) Maybe you can work around it using a temporary module-scope variable and an if statement wrapping the 'import pdb; pdb.set_trace'? Or acquire a lock before doing the 'pdb.set_trace()'? - - %< - from threading import RLock # reentrant for just-in-case pdb_guard = RLock() def view_to_be_debugged(request): ... with pbd_guard: import pdb; pdb.set_trace() ... - ----- %< - Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJYyZTjAAoJEPKpaDSJE9HYJwMP+wdg9K2BsKdymMm40x98miFA 0Rpc8Nnjaf831W2XObqCkxwm3GvPUxHM6jLiebfBZ9juWRBseExGiGMWPxjSTfgy g8L+GDfPOtonKy0RkN8raqfcgSK8ZBZTzs+IEaVWZGobFFfiYOr/sFmd/zA5MQrc Xn/oPEk1z7QbM7vEO8+aZxz/TzijdcFZ8Y0SMu8hjyuPq5OgMISFikssCZaIKuft pniqxOTClEM02DpWV3lKHjcdBYj2kGYN2L31uXW0gdLSbLqdW/WnFLWFnNvuD7mX VQ0T5SY1hHMdcvaZaib76qDZ4oKf5bmoQOhSUZcUSVDQEcFg59NAkDQP4i7HgED/ sPiJT4tp4gpOLcRinvPUxgehjV3pjNt0OfNascV7U/IH02ul/dlJdVM/eQj3h5b1 aJnI8pQA4m0CviOfhqyE3Pio5tQq8PCORtQ6wOSS2EFmePZiNhK4RmRI2Y49cOrm qxgJMZ0LP/H02wINmznGFNhwSN/uvNeABQb4LjJxXFh0wFXR8JGmlHB58FxQZn1e eaq8NXm7h5z8LPFVLCyPgYxfD5oZDSQqKl3BwMUTAnyfS6X8u5iHizgpksQfElDs J1iYH40liX2eqgpLcehdaMguZiMrvMMNBAdeLZtxyf7v26CXELNoi6SnBKorHKHF TTqEcb/vHADzFLAAAfdt =86VW -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/oac4d3%24etq%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Hello world and Starter Pyramid on AWS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/15/2017 07:23 AM, Dan Clark wrote: > Tres, > > I just committed the hello pyramid project to > https://github.com/adidas/aws_hello_pyramid. It's a simple script > (with requirements.txt) that can be tweaked to recreate the issue on > AWS. Just need to change the requirements.txt to use 4.2. > > Anyway, I ran out of time today, but if you give me another morning I > can upload the project with 4.2 and get the complete traceback. Dan, Thanks for working on it, and for documenting your path. If you figure something out about why you are needing to pin zope.deprecation, please create an issue for either pyramid[1] or zope.deprecation[2] and mentaion me (@tseaver) in the description. [1] https://github.com/Pylons/pyramid/issues/ [2] https://github.com/zopefoundation/zope.deprecation/issues Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJYyZNYAAoJEPKpaDSJE9HYwwsQALUqMf+LmYVHq6m8+A1nBCTT M9ZPkb6eXYd+LaBTeCt0ah6/vtpbdsYeiDW/xKHWaJUZKq7v0CUvDd+MBaH9wmyc vIKDwMm7NLdPHmke2W+RhseqRzRZlEi8fb12LXHH2wNJSWOiCXQqjSVH3I2ZszNI oZI+nshAV/Yieu6zS3TvcjinW7uKZKc6D68UKYwgA8KAW2UK62t3TGdnojpEnNXX nJI9ytUCFJLX1qGMM5DLF1uzKXqpjVUSyuw3MJcL6fncAlLNRndML51uLkYj2aiT iI4g4HdptW46peqdPJJRh4tjL+6/87ZMgwsvoeRjmwSVEWV2VuYU4KuThxuRR96D lmxsJf8HgdoU1ojVgZkLeaufpgHbLqcdqwwKFvQDHPM66UZ7s1oPSAS6nc8RvZLi WSMb5g5LRty2QIctCywgiez9CeO6BKeaQdPGDtearXXYnzawyMwxKJDaMCGDdKpa 1nYE6Rz/MRz8Pox1uTzUsTN3UooZ+7K6c7tybBH8Jy7TuhI1whraIribkKvdWTWl DZ/YDzoAFuLDe1oy1Ekm4hT93AFWACizE2OXDiJD3tGUi67V0IABniM/s27pb0uC asQDEAeW21Eln7AD+fn3+/cA8ppsCRXPkfzMALItATjBeyKxXvA848yq32XCweny Ntghx0YOXesn4ix5Oa0u =soKF -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/oac412%24p8k%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Hello world and Starter Pyramid on AWS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2017 07:52 PM, Michael Merickel wrote: > I have one small request and that would be to figure out why > zope.deprecation was causing you issues and add an update mentioning > that it's fixed for . I've just looked at the diff between zope.deprecation 4.2.1 and 4.2.0: the only meaningful changes are to docs, dropping support for Python 2.6 and 3.2, adding support for Python 3.5, and adding "universal wheel" support. I would need to see actual tracebacks / build failures to help diagnose that further. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJYyKnsAAoJEPKpaDSJE9HYNiwP/0/Ag5TT9yURXgV0bD91tu7k FBNKRP3IfGLTjEAPzVbgjZ2EZW6x2OBg4ut2lCcIZ5y9cRlTMu/wBgvbgtnWtsfo NwMkr76DZg+5/MJ65V6lB1TfWnUD3SP4CMRXZnmg57lsirUSuGDRvcPxUPUMwZ7o Pl6znA7RqWPu/j2OEx8sPNWexsMN7GCr0NUJ9A7QAkz/jGMTjZDL0n2fz//ErtPI HWMqRC36ks5ik9uBsKjWUsOY/kfgEbOmn72Wkeqe8Vt0SAkeQgE9VBleRGhmnWD9 YOAO1Z/EjJH/BwUi2p/Da2edVpgX3NStnOi71XiFrhMK7m1aMFjRYZRUd0pUsQEf 0IrrjhbSNzmezA1fT/vk+T7I3lcH6IrUtDJgr2ZaLCpET7qeDTLufxHIjuMRgva/ G/5lIljvfG0uHAQzKaASJps0gE8v5Ti/QPGVjG8WYXxYZFpBluY8AhJxzLr6bagO dkYHRg9KvRuZ8OI3rIzCPPPdblxWkVjqmLYGrjwoEaIP8nAB8rDc2kZ6GY27gU2A ArqwAf2Mu0i7Uapu7pbO+yOAosZbtA3vUQFCTsLZzvW4cMvzi050Mwk9VOgKFxXT Omj5bb09H7aDrVxrOLemp1OQNYm81+YqXIbmGo/yXt1yhapxWZJgDUA06hcFqlUm EYX2OY1GCqtpcLqGxuOO =gZmy -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/oaa9lb%24l0i%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Traversal over a filesystem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/30/2016 01:38 AM, Mike Orr wrote: > 1) Right now I'm doing the 'context["index.html"]' lookup in the view > because I don't know how to do it during traversal. The problem is > that when I'm in a traversal level that's a directory, there are two > possible outcomes. If I'm in the middle of the URL, I should allow it > to traverse normally to the next subdirectory or file. But if I'm at > the end of the URL (no child but maybe a view afterward), then I want > to implicitly append the "index.html" file as a child. One, can I do > that, and two, is it possible to tell in a traversal level whether > it's the last one or not (i.e.,whether there's a child in the URL)? If the default view (see below) for your directory class just does a redirect to 'index.html', and you register a view named 'index.html' for it, that should work: if there is an item named 'index.html', it's default view will be served; otherwise, the 'index.html' view. > 2) Is it possible for a resource to offer a default view? Kotti has > some feature where a resource (a database record) has a default view > field that can be customized by the site admin. I don't know how that > works. Is it feasable to do this without hacking up the view lookup > mechanism severely? A default view is just a view with the empty string for its name. You may be looking at it already, but the "Traveral Agorithm" docs explain this in detail: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/traversal.htm l#the-traversal-algorithm BTW, your application sounds startlingly similar to 'repoze.virginia', and early proof-of-concept for the publishing logic which became 'repoze.bfg' and later Pyramid: http://svn.repoze.org/repoze.virginia/trunk/ Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJX7gY2AAoJEPKpaDSJE9HYZ2kP/1CYGn3QX4zdUV/DG9UwN/0i n9WSFKozo6Vwy2oxgy6Y21+lC06wkCk18QiN8ahEfzZe4loy07+wUMf8ythRrzMM b+SsMOZNUGdySaRErpCBhfrUKDbOmVqnwjg01aLFJE/B97/Ga88MS0DX/XB7qS1o hNs/a0r3MFl+uXLKHstAE5u13iuMCeF0SS8xs5xmgMp/xbC2Z0yUmsGxhGeMJ/d9 cjbSmBkQuhbKZooVgd36uY8YvSq5Yw1p807+2pza1gTXJcaTrdzt9qNrMdW7DCaE J7uNFJ3ucOYIlWGz2A+5Svdg8SXUOKS50kpRDsxB376Njc0e/CT+776yBQKT1UH0 wRFEXLAbeOmSjlKWSLz68JHbnJydH2HHqBNXBOLqUQ78SB+y1QaMH7bv9WYQKwmk S+Nb3AAzx1IeS4UJ3PQsHzP22Ox4w627304QdCzTTMrpXogopqYVZs4xCgyzsupN vpcZLmsi3rWNLPybdU/ipSz9J9UGVpt+rBwfByut5h91cRfijYA5LeRPjw6wpz15 BbG0SndidNrkWU10cQzr0Kpo3LF0HFSjXLkCvnRlljScJ0Tx1/V64mN/ZrVjLve2 GJ6A+dg4f6ddMYH75+KxC7Ww04OlJrVjRi+c2OWfJNIBXOovvyDOeAvjllSupn/7 WhZWqwFVFORlquscYrYM =IeR6 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/nsl0nq%245hk%241%40blaine.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: remote_user
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/06/2016 01:05 PM, Michael Merickel wrote: > REMOTE_USER is a special variable with a specific meaning. It's not > some generic variable for identifying your user unless you have taken > steps to have REMOTE_USER set. It is a way for a webserver upstream of > you to identify the credentials and pass them down to your app in a > secure way. > > Anyway, so far it sounds like you didn't know what REMOTE_USER was > and there's my brief explanation. You'll have to give more info about > your setup and explain why exactly you expect it to not be None. Perhaps the OP needs 'request.authenticated_userid'? http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#p yramid.request.Request.authenticated_userid Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJXfT09AAoJEPKpaDSJE9HYbKUQAMOayiy+WyU4rkyHvxlU51zc na5o0PK0HZM6Jsq4fZ36+aNGqWmYrxMIY3c3ASyDtA2XAuUI9QkWszcwz/0c4dZ8 V9P/mr5rmFSswp047HeiT1FaCzWOk2OnDDjTaJ7OQ0NpuVok6E0xHrwlxuKEuNyv q/BHoC5AH0vY9u4FwVR2Dhb2q/acnMET7Bp4/kz232HomP6AT1/eEnb+5i/hfkA8 ATCXBYxs7SdKwF9SgVVBR0h8WqwbMHIpRZ/+kNxiN86skF7eRdmgmXWBsFsuLUWO I4yNSEpFA2MwleBvmn778L+XqQjAq8zUu0uTGDr9iYfJ76YaQHuDO548yJnFTQwc IgFI1VOQMXWv7RCd0lj/xMn5oIuJdGwNNSf7T8XbPm/HpwmO1Ah/y6JZ9KtewdK+ r4vKm6OgN3c4tXqJuuBFh49OK+UotXNNh+89KGkuq9ikj14i4lTHROaJ+vRnFeBg v+PKIIUk5SRPoc00+2jiN5P1gMhxGAgQbol9HUmBn0CNHuRE2vyA8Ff8VRT+3t/r Wxem2bAw53yyt3Z9h4Nw6d2BoUZsodzQW/T7gajOaQVrsmPvzoP0qI/+lI9QOdSQ VGy13V6hPqaXMfht2aNzPuSuhAjQLGS8CErmEKR176pQdL1b5ZomaJncyPz7vJvG F0WmWmF9EPU6R58o2piV =uvml -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/nljeg3%24fni%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid app with multiple ZODB Mountpoints
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/28/2016 03:42 AM, Gerhard Schmidt wrote: > Hi, > > is there a simple way to use more than one ZODB databases in one > Pyramid app. If you can wean yourself from the mountpoint idea, it is quite feasible to define different root factories[1] for separate routes (path prefixes). The downside is that you would not be able to store cross-database references, as you might have with mountpoints: I consider that an advantage, actually. [1] http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/hybrid.ht ml Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJXczg5AAoJEPKpaDSJE9HYFv4P/36EUVA+nFMRNt4HqnqFXtrM YZsLoimW2Fz5vkUoh0l2a3l5Ciqb46gQ3vTraX5tIfJDIweFlLKbA4JK9c6VxcjN wlOjfR+a+4KuakVhPk8YZGDMS0hAEJpdMQP4PLDv66bbxhNtHPJrjoPD/y+8cGCz NoYol7/tTVEl7IpWPAEK5XRKm3rgBRnSt+GZg8Fji8EeVrXzeax7Ol7IEUMhuJUZ An3tgAErjw25ujMkdi2M6yto/C8YoEWkzjapqUXiLFoTIFwdif1eXryMfFvXAe+A HjKFjGMsoYtSMbXgK7jGHx6cnXAs+aUUE5kZGvUKbhVH2erXLIUzeFbbHP3ZssBP QNpSpfcjbE5abfCHit6utdP1p1nz9LjI6Nro7Zdcff9Hd5wCBDVkpfLyCislgfm9 V+nGhDAoPT+gCBBY/qWHeUFj3trnfEOG1GdaaCTKpRKMOg0kxtw/Asrpe/y2yLGn KECDGh7/0IwhGWngSo2dVPqRum5unXKV+7IlrNk9sbi6/oW8NJ6pOCgzN/5P2dH3 yAer8JcfuKC7cd4XLMo+vIuxGw97xtdbnJN3VRWPvsAwuNRXypjEtropNwuf/Bha 0JLwPmHVgtdWOSQE7GuhTOqdyiK0+A7FbNO3n0VGbFcKpKZMXBkuWD/AqBK2424O QHpB5O6ktNC79XL9uwaF =R+vg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/nkvd7v%24ssm%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Waitress 1.0a1 released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/25/2016 01:39 AM, Bert JW Regeer wrote: > I have uploaded a new version of waitress. I have increased the > version number to 1.0. The project has been stable for a very long > time, but I figure with the addition of IPv6 support and multiple > sockets, it’s as good as any other time… Thanks, Burt -- very nice work! Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJXbpfaAAoJEPKpaDSJE9HYtScP+gIVYlQRUjCjZD/dGTabamlS MOr9JphnHc5wSg7aPjcD3SP3recrL6VRkxu1xhRAG0uxbg4VsZPaLs9jjs0jIAeU AiSU1dT7fDU9fjkX0mPesEeumO/0nH/OrsLYTA0CG9th/Y+uhR2IKxUls3Ywb8Wx tUxunJ1Gd9VHiGIy9BPNvcO6vhQhGLrxAiLafzZbhye9/tNIr7wOPfFB+SR02eKo j35QB3iRXTco1h/umw9ArX/T8t7GUDy8gibAxQoWOWab8ggNBJP8JchiGLvQbQbG 09XSRnWFCrAjujcNzQhPdiV5d1k//jYNFoidUpACEqh8Tt8NUGMj8MONEVdx5Uma y3ElnKbscDaHI/GpDt4YGavG9z0GKa1suKvrcikuzees69If3Fw5LfjLwqtqzZJY W04soFr4fL9tLmjVDIFmIO4gUnlZUREYpI5r0o5u9MuBrmmJVwMzVbh0vZrzVI7q pTg6zLy2wtqcBN8M0ox684Bwjtlt+bCTDK/9wHWRfp/gVP8lkBbeGbkIJ3tIqzOf 97cd6QGx660rzLDjB2Lq2TBgxkNbga5qCKqTQ0bn6ozcnkM2qnlgYxE0z1ez40v4 lQRRybd5Tb6naAjb3f0Q/GrZ597TxZPzuNWmy5HhUWO+wXQZ5bd/QroeZG2E7cUu QuEx3Ncvnc3bnBgqzZ01 =WLX1 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/nkm550%246ol%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: what is difference between python_jwt and pyramid_jdt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/12/2016 12:50 AM, Blaise Laflamme wrote: > The token is just a claim so I wouldn't rely on its encoded > information to provide access level to your app. Anything about the > user could change at any moment, so the token won't be up to date and > will cause you more problems than you would try to solve ISTM that relying on the token claims makes sense in SSO environments where the identity provider is the authoritative source for that information (the pyramid app might not even have any other way to get at it), and mints the token with some guarantee of "freshness" for it. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJWv+B+AAoJEPKpaDSJE9HYuGoQAIPt+Itc1ZRhpOqlfxXukNaT CDwQ6rM1S1yH5A+PxaSaRMJdS9CTc33E1NirclgbPkgEmxRV2Q0ZpB/ts3ZKQcxO 22aInHS/01XLRgHCWNBu51TdRTcFtLQhLGv4kPK6xRVNblQTkiKrPcF4Kp0TF00Z qTiDWupeKUT8RqR1TkF552t9dvb5AUU2t4ylfaK8LOsetbFS5XQ5nFNPrh7i5lyk 0+MvfSl0F6pd9COxdMo43kq12U4vq48fkY+Y1QXRfu9hax/PfJr2GE51YNNgQE9V vE8mlZPzVncBo5HJQ2Ck1HmYopHtSz8bUE8qTUheQtRPpWh/Rj4qkJkMmcjmuHOw WG1/2mtFmlHOvhYqgjXV9Su90pKDbNON0/OGfZO+nf4tmi332rbFfljHz4QnPyxx c3dBwrSumSPn73i3baFgoOpMC+XuSsY/0H4TIqFMpPGi0zH/CosBjsAeFCJNLEcy fHJD9MA3CdwnNF/9oIzPBdpI8Iba1AVZ/6//yzS73svUjRVI1CENITNf1+rozggw DhxlGjxuKeOA2uob1tCODwfDuT7F/3G9IbMaIzbbUA8FC/j7Szhpgii7xx59KvCo 2etVbP+ZcJp/pLPyzO392+VCVOgHpZ2V9QYssiHVBvzajS5FVyQcyPLzhqHsBGcb mxfvIqVAQkb7eqY+/oS/ =W6l/ -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at https://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: need guidance for Pyramid, Jinja2, deform combination
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/22/2015 03:46 AM, Krishnakant Mane wrote: > Thanks Jeff, Can you give me an example of how you do this? http://stackoverflow.com/questions/3206344/passing-html-to-template-using-flask-jinja2 Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJWUkLlAAoJEPKpaDSJE9HYBocP/2C+qW2dfnARj1W1ueCqqR16 WII0n+KsW2PHgIQ8/lncprz5V/ny7GfcJ4iVRbVVLBNAjlA93SuYIMW0vW6xPPs8 uDWtUOkFnzTnwduBNQ+ZV85XZ5IXXnxiQze23BSKKBI6Hc+/EWY4J0ySO+qo3ErP GEe+IpjUArSU1aRGBcvsRuSFpeeIFVL8YzDB1saSFtBvwO8T6OXy5jfseICwmlnU YKmnIP2ZSiPRApVMwegNU88Ij9W60Dt2TC8ktRV4dBHiW0LbMTI0Ks4YDEqWhjsA kYQ8sUg/gU24WgCWPumP/4p0ng/fV6uNNba8P2ToFeZ079sxcl4KNwm49ZgIdj7v EZJAzD5oJgc71nK7vUR341sISCLn3b1CoQQcJOVe0k/AAODRBvqLWY8ojoeZHr69 f1hQbOO0hj4ZsdV2Je9Jra6JHcOdbzW347FoE3l9lJ2TTI4MIJd52zbn1glicM3v x/YtjCOOL6zM5qYhsKrm8dckDaiEvB4NDjGYxzZrZp9AUqVYOWle4ebeuZqh6BI0 ogNnCB29d1M3zWbxWdIfCnG/1pOCiDWyrk5o0LAr6faxz78s8vqCNt267N9lQHbk LvpLXJLFrpCOMv0KJF1+C7pnkDgw++o17xXGW2PE9IfZs+ZuJIy7yR+JFrsEtMkr xk+zdDt7EABJPG8mVEmP =5/To -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Using deform to render forms using bootstrap panels
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/09/2015 08:01 AM, Sami Pietilä wrote: > Hi, > > I am trying create a web form for personnel records, for example: > > test_records = [ > > { "id": "1", "last_names": ["Nieminen"], "first_names": ["Sofia", > "Emilia"], "staff": "No", # yes / no "work_permit": [ { "start_date": > "1.1.2008", "end_date": "1.1.2011" } ], } ] > > I would like to use pyramid+deform to render this data to a view like: > http://ariana.dy.fi/files/panel-records.png. The main blue (bootsrap) > panel is collapsible and each sub blocks in records (like > "work_permit") are rendered as (sub)panels (The template used in the > screenshot is: http://ariana.dy.fi/files/short_main.pt). > > How this can be accomplished with deform? If possible, I would very > much appreciate an example, exaples are easiest for me to understand. Eric Rasmussen has a nice example of using deform in a "retail" UI: http://deformretail.chromaticleaves.com/ The docs for "retail" rendering are here: http://deform.readthedocs.org/en/latest/retail.html Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJWF7leAAoJEPKpaDSJE9HYfDsP+gKS9WppuJ5v8+fr8aS2FWvE CBGw50jHq/7dD7G5J7pKXmD9s76qdRtSYi01LOfdgqo2VtTtdLu1nyeNpb10SHNi c4aglwRFzl+33sjMPVu1Jqm12xeVZepHqr0y0HC5I0X2wZe71iUKnzJja84tjBQ4 WSG2C4MUvCD509NjTsydBVL8yiYb26Cz9J5Fx0G3iuqss7d7qoClACpwL10QkWtg wPhgd0IGnwavFr34QaFF9lQ9pwrtzqShqNeuSE8TPaiYRbMpd/z0DWKB4yLi8xDh wPJspBK0helJus9XRbHtsbFBjoBi9uyVqzqbpvv2Cvdr+vTjImBjBfFN/TK6twwH OFMdn+bwbETsPrDXmBX6oKkK8jcNhy+KY8G2e6IXx758cuYTxdAeqV6RccvnLk54 lFwOCzSHbCmiCEgdqmeC659NHz/jEEUZas/746HQKfg/rpKQw8IDYNFRIGmJu1b5 HFovq2DBeEeemO41lWEwsm+h64xntn1OUUNnTNff7X0BWIE8w+VSfJmC6OL5gVTf zowDFbOIU0XrJ8NNoxQVOLzug69jYwJR8LuYXnQEi10KtkvF77eq/TvLZSYvWKHf SaFCpNUvpWTtHpClOIuAYe6PxT74jaF7VIPqudPQbXvOLCRivUD61Elg64WN25Ge VF19aRomlD7eYUURiTlD =psh2 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Chameleon tal:repeat issue with JSON having "keys" section
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/07/2015 03:33 AM, Sami Pietilä wrote: > I have a database containing JSON objects. The database JSON contain > a block named "keys". (For example: "keys": [{...}, {...}]) > > I am trying to render the keys block with chameleon template with > tal:repeat="key record.keys". It seems that this syntax somehow fails > to handle JSON if it has a block called "keys". > > Can I use some other syntax for tal:repeat which do not fail to "keys" > value? I have tried to write this differently like: tal:repeat="key > record['keys'], but it did not seem to work either. I just created a project using the Pyramid 'starter' template, and edited the 'mytemplate.pt' Chameleon template to include the following: Key: ${key} I then updated the 'views.myview' function to return a document with 'keys': @view_config(route_name='home', renderer='templates/mytemplate.pt') def my_view(request): return {'project': 'chammy', 'document': {'keys': ['AAA', 'BBB', 'CCC']}, } The view/template renders the keys as expected. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJWFVnMAAoJEPKpaDSJE9HY3xUP+gIAOvssSsgBqU/IWutxdEtG L8310KWQnauLXVopxp/KPnvSTFzwciBc+U0OMrD980OAk1Kh8ATlEevihErN27sZ zEwOqlq+2t1saV8rYWKNjkcj4QPAuIdJyI+vFvf0juBnrLUkJpXCnp+lawSX2dLJ uOAVyxjMQzs1/9+LwJsjezpXQ45UkIbn6GDQ8OcmFjBhx+JQVjmWMjXIcku4Ar01 bs1TsvvaDT8KpyujVKymfc+kssYzTGG7/lQ5CuUV8jQK/9PYRDcWTMeLrVOYHR98 8hKRTdLZwAiKdBNrAM6Aftg1Ii/MzVCC+unolrsh2choFOhmDPDfLeQxqoLEGqfB gJG1NaDGSCsmyWsMl5RzJg5DyEe5DCiOBVOp8XBU9drNn4hYKVNtGaOVGZBtJTDM C/WOVoK5Y/J+vQPTDIR+3s1fwwmlXMhqnBAyEF9ZbUFfaekphR7EvFnwEDNnpE2N pmXlo9KttqktGuAg6QL8DEbNrYCN0UpDedIPtzrtM/jTfMtrcSOlxSqByCH2vkYL 9TnDMXbnNJeFCf5Gl5mUC4rspUP4+V5EimDBSUTc2OTA7LIo21keOe0drSB9/jXO 4rCcnhy5QIlfPS3pDuUMv/KxtZ8XimIWrNsMXCuWpW9Se9sp4GL+QXo+zO3fSSui KrjGFh6pOxDxSZRyPmKZ =IOuX -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Traversal and extra round trip to db
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/31/2015 12:20 PM, Michael Merickel wrote: > On Mon, Aug 31, 2015 at 10:45 AM, Jonathan Vanasco > wrote: > >> Wait... am I to read this that traversal searches down for success >> (A>B>C>D>E) and not up for failure (!E>!D>!C>!B>!A)? >> >> Are there no hooks to support caching for parent levels? >> > > Pyramid's traverser is your hook. You can completely replace it. The > traverser that is there solves the 90% issues but is explicitly not > written to have further hooks. The traversal API surface [1] is > incredibly tiny so it is simple to write your own in any way you wish > without worrying about that API breaking in the future. Note FWIW that the traverser comes out of Zope-land, where the graph being traversed is in the ZODB, and hence heavily cached. BTW, I have been under the impression that the SQLAlchemy ORM already does some of that caching: am I wrong? Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJV5Ib4AAoJEPKpaDSJE9HY/6cQAK9eFS3CB72fUrM1MRIC8NOX lTbNtKZUyVkCjNIkjnsBuq7kx1n1PNxOgAWsSz+qOtDASzWN+8vhAQ4mQFA1uuGA 8gHqfCBOJmiabqOQQfO5L+xG7IPVHuwEvX+wM3vwfOlTeZT3yKmh3JhTwkoHKPAw VkLfDvEFWmX1AfOsCcvTIDN2JGGh9fTD2RLf5D32JIdpQzrk1H02FvlN4Ng7M+ek l3EDJ3LiTMicE8iUyTTx9bGF/VAGFfrmZ53wSAfgxMUeyusGcb6/XRi9wF3+O2tW MgL37BkaFMx4iixsUOfzdZfJAuH6/+HObcIpfbvwMLz8pULcZmGV8f85HnJ1y3Ni hgh5B/H+tjAEqvVd0gWZbhz9sY7IiGRCRTDwqqFH9zqcL7OMqOtpb104xRiliyR7 U9QRt1CneDbrwxOVJy4T9Uulpvsj6xfTI10QKtrI18VTaXoeClduSfc2c+qW1v33 mP5HofIU36ouUI73sPsHWfOUkVmv+6tpvpnjX5tDS+VllU7mzxiwwAhYUq/2H9nE S0W5lnXMALXa3Jfc2SUoowxvXNvGdpAtQGOoGdjARnS8MTh9ZAeJt7DgBeioLz+q eha7fIzwjyb5KL68G3B8pdZ38FOY6vb6We6NIsU3MIMLaz0trhcFFF4jPWpUn8ud ewawFSsF9wBIJP9yEzwB =OnAw -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: legacy app's dojo xhr requests failing with PredicateMismatch error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/04/2015 06:47 PM, Iain Duncan wrote: > Ok it appears this is a bug in pyramid_zcml that got fixed in Jan of > 2013, and as far as I can tell was never released. Anyone know more > about how to get that resolved? AFAIK, pyramid_zcml PR #5 (the XHR fix) was included in the 1.0.0 release, 2015-01-23. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVwULlAAoJEPKpaDSJE9HY0vwQAMAMJv//tUp713CLnlv/c4Sn 9gfwKQKK23d916wZvbrwOO5dXVQGfyAyvgpPH3Qk42pJhFEp45s+clTheP9CqBEC gXEzkzI14yZnmSnw05NqYHiLtwU6TBk/VFeIntbWoS8mElYxSOfkN5Xy1b22dfsK jdBwZyKsUPg4n8j7cMIMAbDzcubU5IXlEAj8nhLkIaYVlWnSnOh0gblNMHr6iitn aGLqpYZOGMs4X394hDY9GDIaKtRyQzGChPxn2wRpF1RaqFcZFLyx4W4WsXpE0o4U /aJt9/FtImoLE9s+QPq2H6Muqk+SltbB8miZ6mkWx/21HWuRciX5x9xBvVQDgsoA 0pnSxwxxjpCdmwTyZa8NfuVzgXlJUlgbFgapTdAKDofToAV/sjWBidb/H7Oxonzp eMnFms3DEM7DA7Fa6pYu75G6PmTuDvCSCQBGowvjOXY/SmKI+HPxJMAIr+bsMeBR M3cjM4ZwxkXEZE1EVKn4A8qzMzXjZ3CF9poyR+wVNl7N7vWIgFNt2F/gIXfVJvDm IUdZWOlvq7TP+ktCrlDFa3wn6WUCKtWIToVOi4CCNf5MIPr5mbl3yMgKFVlasJxV znYdDlMfS6Ht6kST49BJ+tOcAPKzLbwqbPfUFHwDz5flueFt1OvwI5Xi6QDTFePJ dg35Vjlp3rY1TTNzNEnJ =v6fi -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: WebOb 1.5.0a0 available
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/26/2015 07:06 PM, Bert JW Regeer wrote: > Key was never an keyword argument. It was the cookies name, that > variable got renamed to name in the cleanup. > > 1.5: > > def set_cookie(self, name, value='', max_age=None, path='/', > domain=None, secure=False, httponly=False, comment=None, expires=None, > overwrite=False) > > 1.4: > > def set_cookie(self, key, value='', max_age=None, path='/', > domain=None, secure=False, httponly=False, comment=None, expires=None, > overwrite=False) > Even though the signature didn't supply a default, it is still a backward-incompatibility, and should be noted as such in the changelog. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVto5LAAoJEPKpaDSJE9HYGnAQAIVqDDuqXSzrWk+FYkO9EnGd XNvtt5XbyghwSX5O67M8qEZE1ZEhQ3f6ETkYbxvbMndUypBdymLlCbNEq3YXQrvj PpYFtbrKC9X8hiZJwqVG30FOOleswfhTOY0qBd/LIvlpaewpGM6DgF6Bx+juX9pm L91KooYZPIlsiv+8uY51m7ASEkSHE7MzSS16IbJBkRliZN+iN2qSyq70hK9RRTI+ L6MQ82SGEuMAakK+YTLko+l2t2WLCKzN6PqhUWX0/T5ptgJNIM5J6Tkrskk80MBE E8+o8P3Unls5rROHEElild9+kpk6GvyvVymesuXYZDihxFyAGbuYdRFuX8nbCwtO G5NAejRsx+pSk6+xkI+n0k2htRrCCV8HHbz29YumtdPqJbe71DS5h7XZkDKsRXFK HANs3HFexixYFUesh0b2wMZOv8NKZivOCIQVpJka+jSg/+vbBO9QHdHbLA7NdizZ 0nXnRR0AiZccNcFkxpicFuj3IJFHrwCQEqueLH8KPX3GyuiRUTdrVeOiVj6AX/sl m1kabgqcm7bbkcM7NDeGRNF3Vj0ELz6pwJNTQTJHoMWXwmT88/hlnb0h6rn8zjTz tTukSxTa9vLh1KTao+BoTG7ac+gvDiyRfc7cShgF1v9oGDbSwCKW4KG0WNKAgTwp H73DNNShENu4uGjgbw8x =T7Dp -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: trypyramid.com and python 2.x
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/11/2015 09:53 AM, Chris Rossi wrote: > Maybe replace the word 'artisan' with Tres's bullet points? "Artisan" does have the happy quality of being gender-neutral (as opposed to "craftsman"). Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVULrtAAoJEPKpaDSJE9HYs78QAIakXldUVGijuACMdnBw/D+r sGEua0znEGQryH/fYIy0b8ExSaELtfvCG4EC2mBrxPYJmzk/0vTx/s7C1awzws8D ParNZPO50XizPV2MHMI060U0HJYQFDE8wf1RWrOvk4CbP71oDh/1EtfweIvv9MTE zdz6tfAwEgk/E/d2DPy+yLW2eGh9129iP5qb6m1ZJhwJh0w3mkpoTVDZ0p0V5kUX IPA5UdOy65BpfM3Rja9j+ACiWreHuFbaDEni0sP4slO7wfDnytnxgl/sE4deipGB OmqmcGKEs0NqKv95fj7vQZWgGZTtE+1+SALjq3dNj/gETURcB+GFqoVFOd+qdliK 9ICxx8Ge2/oEF4zPuw3rl8wH/wcx9fBSe7MkvWJoSAwa8xJ9hZ/sk2EC051DUzoB TXgVTzHMcerHDMSaHSE5ASGqkytf0gdynIEshVn+fmnv+F8d1nAaJROPy+JcdNUe +hYBeKDB5KfaStnE/y0hTnObdHbWIrZAmLe/gU0G6r/gkjW6DM1zE5vO3W2TH4rz x7xFMjyZSG2ZYzsny/cIz2OzwkDKTH10Kcs/uetc2bHReLN9sU9RtoB1vjeHtyjF jHRZXeHmbEQJD919t9nEkLO3DNaXNh61oe+RSn6mOliPm0z1/CZbrgfJ8pS/o938 cYmwl32s+9dSjijRRaux =0+jM -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Forms and Validation With Deform ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/11/2015 07:15 AM, Sascha Gottfried wrote: >>> So the bottom line is: deform and colander are actively used and >>> so stable that no changes were required recently. >>> > I am glad to know this. But usually developers mark such libraries as > stable, why this is not happening? Can you think of any reasons? The developers marked the last release "alpha" because they believe it may not yet be feature complete (I don't recall the expected feature set at this point). Because it works so well for their usecases (as needed by substanced, largely), further development activity for deform tapered off. Resuming it requires some extra "activation energy" which the developers don't have to spare at the moment. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVUKNSAAoJEPKpaDSJE9HYW3AP/1u7Q7F91wVPgjZdKpFwAvrN SCeNTUFph7OIzVjmPvoEyZ9oT3tQQNm6pVzC5wyxbWOkomZq/yf3+hrVRpoi4XOn SXpRdHHbA5Pg2h89mTnSmut4I+VL21wQ36wHGjwHrSYI9TvqADJ2vPMsHZ4Q/tLE cmtZ04UoKwTRjGZW6s3SfB01RWEytxHewjMAiGZulr40XR37fEh6onxjHT+mq392 V4XFkt6EPPJFhmB5YoJtUDj+A1/1HikzU7COXwzL1WiqJ+LsV0kQ8dcMTjS8stRh iFDtyhA0wtKDaHePWIFaQg+ZAs4ZMY/B7W6SVkhdkPI2xKj4swi/4kPTewYIeRMd Q7xJuUGYrm2GUaSIuuWUPbTd29IYGxjTM7XjnT+L9UgIZPrZ8Aa616N3WWDVkott vBOhneRw1Mo0akKDTD9H7GJA4mXgdcZ257o4EW1e6doMRUnkyUVAk5Ff21yE+Jo8 w0gC5cj/1dPEDHakBXPtYMEjoVgHHNaKaI0WZQmA+wxNXBi/Nkw19igUqO7vimZC IkOpouWiJwKgoXne/LPWd6lnR3sdswgB8he8OcTFt3NCaJhlqdczEoPbpZQ5k4/k Z2gQvQWlwDknILGalr1yDWtPA51ReWZGCt/TOoYH5e2LkSHVfP9R8k/pd5tNo12P 5qkgmMi4+2V2NfeWOUqy =5qzZ -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: trypyramid.com and python 2.x
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/2015 08:02 PM, Mike Orr wrote: > I don't know what ""by artisans" is supposed to mean. It sounds like > a vacuous phrase, especially in regard to web development. We use > better oil paints? More intricate decorations? Not mass produced? I read it as: - - Craftsmanship - - Seriousness of purpose - - High committment to quality - - Avoiding "shortcuts" which trade that quality away for mass appeal Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVTqolAAoJEPKpaDSJE9HYmwsP/2Cw0Y6JgXLYqWTjVusvcaa1 rQsggEuHMhgN04/4HNdXF8qHwuTZfj8AZa4LkRGvEz2a7mtLRXIxOCTN3Qqgr/Yl rzSyEKtp8jj758ZJE7zN8xDSPJSnkkl7N99+ntS34HZrdOHWvWtmEVbMhcWc6zXw /MdfF29OUb77tliR6Br+AXaG3qolbZi+TSOL5ZlFXU6pUs2qzRmFZzU/zUGSCCmS ITipTACj7Nh3Tx9Kj+OwsQGoF0enIVV/k/JEMywplmLijC2DC11hqenh4g1v9VXO cxEZnKJ9afG2jkgq5rZLzt7AyomZE2a8+Ep32D8LSCn3xCy62WCbhrIhn2sllJ94 K/k7LTDDu9x/2Iu6HH0Yjnj3vo89OlreX7r7T7/Eb6Bd54lC+ESRKVJB8AYuxo1d iddMHshMMKYcuDqlJIoNLTQ248oVss8o69veATJwCFyOhGyRDxia0SOPlGaaGjyj AXy789N5RMZ2PJQan2pz6qXWJD2PDNubH1aCnGPztZXdT3aLvysUFeBYAw3ZrU7Q uGiJfLcDDJyzxr8KdCBkmbWbfYwEWYUqLSsWQE6+kgiQnHKUUJc+gjLUZmR6FM4k RU6F50/N4oHT8r4JTQHRa1PM40T8eKHoKPp3AjD/Qr/741TSgu9Jx22w7d2ajfxy Pt4BdsfCBqt/nXEIijKt =Oz4j -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid 1.5.3 released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/24/2015 07:25 AM, Adam Taylor wrote: > I'm not sure where to report this, but we start our pyramid project > using systemd on CentOS7 - the first patch ( > https://github.com/Pylons/pyramid/pull/1577 > <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FPylons%2Fpyramid%2Fpull%2F1577&sa=D&sntz=1&usg=AFQjCNFXHZgYgjkLa167vgFy1ENTL0INUQ>) > causes a traceback when run with no terminal at all: > > Traceback (most recent call last): File "/opt/clearsky/bin/pserve", > line 9, in load_entry_point('pyramid==1.5.3', > 'console_scripts', 'pserve')() File > "/opt/clearsky/lib/python2.7/site-packages/pyramid-1.5.3- > py2.7.egg/pyramid/scripts/pserve.py", line 58, in main return > command.run() File > "/opt/clearsky/lib/python2.7/site-packages/pyramid-1.5.3- > py2.7.egg/pyramid/scripts/pserve.py", line 226, in run > install_reloader(int(self.options.reload_interval), [app_spec]) File > "/opt/clearsky/lib/python2.7/site-packages/pyramid-1.5.3- > py2.7.egg/pyramid/scripts/pserve.py", line 734, in install_reloader > ensure_echo_on() File > "/opt/clearsky/lib/python2.7/site-packages/pyramid-1.5.3- > py2.7.egg/pyramid/scripts/pserve.py", line 720, in ensure_echo_on > attr_list = termios.tcgetattr(fd) > > Anyone else? The issue tracker is the place: https://github.com/Pylons/pyramid/issues. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJU7iPFAAoJEPKpaDSJE9HY4KwP/1GEc0CrM4uG+dCcSWprxAJR tfO6N2nmCL01+lKDnOOgHIol1zmBunTGOGT1FhUIQ7PQUQ9SGyc1+PAyyhDA3E9b a5JarIs8aw8NLuGo1UWxLvjwNjRQpaSLK+cSV83CqysZvn4UP3cbqh3erLOdxycR NoqTkB1tOwTiqO0QBvSS6zmyf8oHvbuyQPlEb6CjekEIWFP9ppNpQXlI9swsZeme cKgsGXEOxLdmc5zll6haeyxl+INYjf1n7Ny0q1TExVCfrvblYI96IXAzRRXXl+xC CrH41NXw1QugDGKVRJ76FGsd3fVTw5DdHP2VTJNaRu3zGT7onmu6p2ykU1LLiwzq 0H15Xe8iciw3EsXDYbaHX3e1vfMGxQfoHig7G22i1H/bOHV899HPTyGfE+Z2nK9i swERuR0uWVeQiOhmlMWxVXodDtdkKXg8RBGeU4Rtr2ohv9Hc0Aq7Bfw1+ULgwhyo ZtP7IyxTk95kJ2FVl0wqgE1ZyApaD7Jx45IpnKS5+rOqGC2DBjZYwd/jd6OWCQpq TNYp7qn6uetkpfZkUtr5m7negwO3C5RiPvpmizvWIKU2n/ivfvoXYzkeDIRwBM5E dBLTBwr1IPmEDu2PKGOofD3ThlDuuS6SF1iRB4c88ANNojJ8FIxqOQmfvfog/cim YknnohcJJMbvNyeg9byS =8ahg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Question about pyramid_mailer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/17/2015 10:53 AM, Thierry Florac wrote: > Hi, > > I'm actually using Pyramid and I need to use pyramid_mailer package. > My use case is quite simple: I have to send SMS alerts throught > several gateways, which are using SMTP protocol. For security reasons, > each gateway is connected to a different telephony provider and each > alert have to be send on every gateways. > > My question is simple: my application needs to send alerts to several > gateways, each of them being defined as a single mailer, as well as > "regular" messages via a standard SMTP server for which I have > another defined mailer. So: - can I define several mailers with > pyramid_mailer package? - if so, can I get a list of defined > pyramid_mailer names? > > Thanks for any help... Sorry for the delay in replying: you would more likely get timely response if you sent your questions to the `pylons-discuss@googlegroups.com' mailing list (which I have CC'ed through the news.gmane.org NTTP gateway). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJU5izoAAoJEPKpaDSJE9HY90IP/17ma+xh5+dc8e+1Lo1mJz3P W7L6Tn15Jbds//krenVQKbjAkoDdWGqcH/yjyYn0AhchkDTwqTDNrIS6lSzj8YOG SKflFhuYCsIIxd8IGEHfanDcIhW0PW7/u4AFikkXwgt2vnAiYoArbPo/sVjtizKW +vOywLDjt0FkeijW5Xx8618OCDDL2pY/A1oXglraPbefk2czfIqCVNK7YIaOVQQZ +4EIhZhpnZL6AfaJmI7/cPHYU00hwAee7mFQYU7NEtK0O8y45AltT8iLAsjfdKzo TDCgdOw5nvIw+KEstcxLZI2ovgiOc7lkN4OS5UA5RlAphfEo1qo5VFt0ckZKJwLn ywKf4+sExlSx+jzx4ECgCkd+7G8mL3JCgv/bTP10SzgqIeBjqkV5VgYxsQuEm3KR flveW3bcnkqRC2wTFC1eaJ4aU8xM5LJFZw736ivCXXe8Ab7xHgaaMFg6VZhaz67A rsduSbHvpTJuKMX+Eo5ZTviPQdrWcJ+lK2CKGo65xGm1yHcMQNB0CPZoqdY2qTJ+ 5C/dNl/DfT97BYGA7GHJ3JvCJR6TCUxjg/XpK1NV8A3AJa4zUpna0FB69H4u9PuQ gdmWrtdP3hkchQbJqVdlWNCcUmvrh0uIuvf3Odv9DYMCCpqOHv8+DOcBoeilc1k6 1WgWhr8k8W9uQDiGOi4l =rK1F -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: is request.view_name set via url dispatch , or just traversal?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/12/2015 09:16 PM, Jonathan Vanasco wrote: > I use URL Dispatch, and can't ever seem to see request.view_name > populated. > > can someone confirm if it is supposed to appear in url dispatch > routing as well? if so, i must be over-riding it somehow or have a > bad install of something. I created a new scaffold using the 'starter' template, edited the demo view to include 'request.view_name' as a key in the returned dict, started it up, and visited the page: no problemo. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJU3WHSAAoJEPKpaDSJE9HYO8kQAJIecfqS3j31BXAFQCqAlFWU C/CWhgbAoqUuicMCDetC6UuL7x7aFx3BhQOFOOacBuMb2KNYscz4OTTkVqrhrNBX R45aK/kAk6mognmJvjXUxfSYl5ttew/OtNHd3i50cEPaSl2stC2nqWfjvwqMPEuG VU26/x6x5/0+PUhyeERtxAeczwNhyCurXutlaKG2qchYrdM9bZ45bLRcYVLunPno yqw1qZv7zBbp4UvbUb028DhZt8lXNgrQniaJi4Uc0tHAgz8WAOL/QSRB7GUm/1YD wJ5ZurWJqtAvlPgbB2hHc+EOqbrxj7Af1yBUpVzy8NE0UDyiTU3tpuSCZk9dudIe Q+rStY1Xo9nyHD9367YxOGiETg3gL0N0V5wf31XaGdzXfr0LBpAlYqLn/XT9Tlbz 4b19YKMaSC5fUBWjmeFpW6Qyf9zHS6Pjzow8ATW9fwWR3vYtaZHWJ6h57ahb1KEO NY1s/DSSQgN4Nc/9j0AC/zBaTMnl2oHHN8rV6es2OIQn7HJVUIJ5lcpUo4ekO+GL nG2b4EIBXiMnxBOlh2jGH0YmHmsvCnS5B9FvWU6rHdgNIRVMmW1HOFbCBodhgQ9Z pxKzi0DP75DtrMtXaDNEnxRe+Q3pwaoMuUh98ymEWK4ItLgykU7/4758kZo5o5TM D9rYoDocaQV6t+qlcuBa =THcD -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Mac OS - pserve exits without any errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/29/2015 10:18 PM, Marc Winoto wrote: > Hi, I'm in Mac OS X Yosemite, running pserve in a virtualenv using > python 2.7.6 > > When I run: pserve development.ini > > inside my environment, it just exists without any errors, exceptions > or logs. With verbose on, you can see it write out a .PID file and > then immediately delete it. I've tried putting a debugger on my python > to see if I can get some sort of exception, but there's no error. > > The output of dtruss pserve development.ini is always slightly > different. > > Any ideas on how I would go about finding out what causes it to exit? The "main" function for your app needs to return a WSGI application, typically via: return config.make_wsgi_app() or else the server will exit. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlTLqZ4ACgkQ+gerLs4ltQ5knQCeLKXMqXnJ8zNNoEblwnl7HhFD BCEAn236YX+DEpR6iumbLPeFyCwbf86/ =Fokx -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid fulltext catalog
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/2015 05:31 PM, Thierry Florac wrote: > Thanks for the link. Do you know of any fulltext indexing solution? Hypatia ships with a text index, derived from the one in 'zope.index' (and the Zope2 'ZCTextIndex' before that): https://github.com/Pylons/hypatia/tree/master/hypatia/text Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlS8NhwACgkQ+gerLs4ltQ7M/wCgx0sLNK2kQh2NuheY4dm5EWm3 nXMAn3NR4maiah1IFEY1FE37mNJMed+h =quG3 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid fulltext catalog
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/17/2015 07:28 PM, Thierry Florac wrote: > Hi, > > I've written many Zope applications using zope.catalog package, along > with zopyx.txng3 for fulltext indexing. I actually need to rewrite > these applications for Pyramid with Python 3.4, but the later one > doesn't seem to support Python 3... So what is actually the best way > to manage indexing, including fulltext indexing, with > Pyramid/Python3.4 ?? SubstanceD uses hypatia: https://pypi.python.org/pypi/hypatia which was forked from zope.catalog and zope.index. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlS74qAACgkQ+gerLs4ltQ5gegCgvq/f37c1bBe9tpBXr0kAP2f8 9hwAn1o+szn+TP/4B1F6iGEV9Qy3kWRf =deoc -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: setuptools and deform
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/16/2015 03:14 PM, Tim Tisdall wrote: > On Fri, Jan 16, 2015 at 2:30 PM, Tres Seaver > wrote: >> >> If you are trying to install a Github-generated tarball of a >> package which has PyPI release, you're "holding it wrong", period. > > > Yeah, I'm pretty sure my patch wouldn't work in that case since the > ".git" directory would be missing... > > Since you're further mentioning MANFEST.in I don't think you saw the > patch. It does a "setup_requires=["setuptools_git"]" if there's a > .git directory. I apologize for misunderstanding you -- I should read more carefully. I don't see the point of the 'setup_requires' bit: if you are working in a checkout, you should be using 'python setup.py develop', which Just Works(TM) without 'setuptools-git'. 'setuptools-git' really only matters for the *maintainers*, who need to ensure that the non-Python files get bundled in when they run 'python setup.py sdist' to make a release (we could subclass the distutils 'sdist' command to barf in the absence of 'setuptools-git', but That-Way-Lies-Madness). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlS5fvgACgkQ+gerLs4ltQ7ywQCgqL1n2pN4mNazpQ0bq/PYuicO t14AoKpKjeS/4jRzEC7PlLxuYfOdg953 =L3G+ -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: setuptools and deform
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/16/2015 12:59 PM, Tim Tisdall wrote: > On Fri, Jan 16, 2015 at 11:33 AM, Tres Seaver > wrote: > >> We explicitly don't support *installing* from Github: use PyPI for >> that. If you want to track non-released changes, then get a checkout >> and use 'setup.py develop' (or the equivalent buildout / pip chant): >> none of those require `setuptools-git`. Or fork the repo and manage >> MANIFEST.in yourself. >> > > Yes, I'm aware of the current policy. However, the patch I've > suggested provides a way for people to allow github installs without > adversely affecting those using the PyPi package. > > Maybe you don't see it from your end because you're already familiar > with how your system is working, but I wasted a good chunk of time > trying to figure out why installing from github didn't bring all the > necessary files with it. I'm just trying to suggest incorporating > something to prevent further people from wasting time on this same > issue. The arguments against adding setuptools-git across the board > was that it was an un-needed requirement for those using PyPi and this > circumvents that issue. Adding a MANIFEST.in without adding the tooling to keep it in sync is not an improvement for the "normal" usecase: it means that released sdists will begin accreting "garbage" files (as the unmaintained MANIFEST.in bitrots). If you are trying to install a Github-generated tarball of a package which has PyPI release, you're "holding it wrong", period. If I could figure out how to turn the Github "releases" feature off, I'd do it in a heartbeat. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlS5Zs8ACgkQ+gerLs4ltQ4KEwCcCH1Tzx7GV/6PH2AC1Y2Jl50o fV4An0t+hBgJoYxLqq15oH4D8pSp+Gya =hJ+e -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: setuptools and deform
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/16/2015 09:56 AM, Tim Tisdall wrote: > How is the approach at that link different then the code I just posted > as having an issue? I can't see any difference. The issue is that it > does install the package, but because there's no MANIFEST it won't > include the templates, css, js, etc... It only includes the .py > files. `setuptools_git` is a package that generates a MANIFEST based > on what files are being tracked by git. It's intention is so you > don't have to manually create and maintain a MANIFEST. > > The issue is the approach that you've linked to doesn't provide a > working package because none of the Pylons projects have a MANIFEST or > some automated way of generating one for you automatically (ie > setuptools_git or MANIFEST.in). We explicitly don't support *installing* from Github: use PyPI for that. If you want to track non-released changes, then get a checkout and use 'setup.py develop' (or the equivalent buildout / pip chant): none of those require `setuptools-git`. Or fork the repo and manage MANIFEST.in yourself. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlS5PWsACgkQ+gerLs4ltQ6W2wCfdXN/BpSy4pEASbAZo3yl5SRz K0cAn3HufF1F/OLTK+3ef8NJjaR565Oq =SEFK -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Restless api
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/31/2014 07:30 AM, Luis Aguirre wrote: > mmm.. wait a minute. If nobody is interested in > pyramid/sqlalchemy/rest should be a good reason. > > Somebody is using pyramid as a REST server? If you do, how do you use > it? Using nosql databases as mongodb? Some advice about all of this > thing? Lots of folks are using Pyramid for REST, but not all of them are tied to an RDBMS / ORM: one of Pyramid's strengths is that it doesn't force you into a "square data" world if your problem doesn't fit. For instance, I've implemented REST-ish services designed to populate and query a Redis back-end (for graph visualization), to serve data from LDAP, and to generate JSON feeds for arbitrarily complex hierarchies stored in the ZODB. Others may be serving queries based on Mongo or Couch document stores, search engines such as solr or elasitsearch, or RDF databases. If your needs are simple enough (e.g., you just need to serve data to scripts running on pages served from Pyramid, so CORS doesn't apply), then you can just write "normal" Pyramid views using the 'json' renderer: http://docs.pylonsproject.org/docs/pyramid/en/latest/narr/renderers.html#json-renderer For dealing with more full-featured REST stuff, I've looked at two frameworks: - - The Mozilla project's 'cornice': http://cornice.readthedocs.org/en/latest/ - - Wichert Ackerman's 'rest-toolkit': https://rest-toolkit.readthedocs.org/en/latest/ Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSoyQcACgkQ+gerLs4ltQ72hQCeKwg8C6p5MhAIPqwVze8+sdPA y2QAnjDu8kfAaUAelmHhFX7LLANeE2aN =kxOU -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: PasteScript require issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/30/2014 08:04 PM, Iain Duncan wrote: > Hi folks, I'm moving an older pyramid 1.1 project that was built > using buildout, and I'm getting a strange versioning error: > > While: Installing dependencies. Error: There is a version conflict. We > already have: Paste 1.7.5.1 but pyramid 1.1 requires 'Paste>1.7'. > > As far as I can tell, Paste 1.7.5 is the latest Paste. > > This is odd to me because the same buildout file worked on the old > server. The egg list looks like this: > > eggs = ${buildout:eggs} Pyramid==1.1 WebOb==1.2 WebTest<2.0 > SQLAlchemy<0.7 MySQL-python==1.2.3 pyramid_zcml==0.9.2 simplejson > formencode tempita webtest PyQuery BeautifulSoup4 PasteScript nose > nose-testconfig > > Anyone have any idea what might resolve this? This is breakage due to new versions of setuptools, trying to implement PEP 440. I think the consensus on the distutils SIG is to roll that back. In the meantime, you probably need to pin *all* versions in your buildout explicitly. Ters. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSjZeIACgkQ+gerLs4ltQ47UgCeJ0C1aqDLLOzMuXHIYvTHfsLm oL0AnjPF7G4y7G/bJI//FckbZ/mJQYIF =idAg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: custom_predicates deprecation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/30/2014 02:04 PM, Mike Orr wrote: > Is it intended to migrate to registered predicates > ('add_view_predicate' method and 'predicates' argument -- even though > these are really route predicates rather than view predicates)? IIRC, the intent is that 'config.add_view_predicate' and 'config.add_route_predicate' together make 'custom_predicates' obsolete. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSjZXAACgkQ+gerLs4ltQ4xAgCdGOfaSYaey0PSOsNn85niPktm xGIAnizBef4/PrgQQb9k6MUshAvFx1Op =4xxJ -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Same mailer instance being returned regardless of which request is passed to get_mailer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/22/2014 03:04 PM, pyramidX wrote: > It works the same if I do it like this, which wouldn't make me think > there will be 2 different mailers returned, but in this case what's > the purpose of passing a DummyRequest to get_mailer? The mailer is a "utility" (a singleton), registered in 'request.registry'. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSYgR4ACgkQ+gerLs4ltQ7B7gCg0vedXKY8kRhkjHRLORFY24+U 01AAn2y++SpE+ov7FeYjc0N9mEieL1js =0v4E -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: resource_url problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/22/2014 02:29 PM, Mehdi wrote: > I found the problem. apparently __name__ of the root resource must be > none. i had set that to "root". Right. For those playing along at home, that requirement is described here: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/resources.html#location-aware-resources Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSYgJQACgkQ+gerLs4ltQ61WgCgoID1/g6KwwxjEDjDk5ULCJJF wm0AnA4wmnj2c0S/QhnvIcqqeDbI7LFP =dHEp -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Upgraded Pyramid and other modules, now tracebacks are broken
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/13/2014 05:59 PM, Ben Sizer wrote: > Thanks for your reply. > > I wouldn't know how to catch the exception any further upstream. I add > the routes (in this case mapping 'front_page' to '/'), call > make_wsgi_app, that gets run by paste/pserve (I assume), and it > invokes my view function (front_page) when I point a browser at the > site. That is defined as such: > > @view_config(route_name='front_page', renderer='front_page.mako') def > front_page(request): logged_in_user = request.authenticated_userid > > And if that first line throws (because authenticated_userid has never > been filled in), I never get a traceback. I don't have my knowledge of the traceback handling swapped in, but I do know that if you expect an 'authenticated_userid', you need to protect the view with a permission: pyramid doesn't authenticate users in unprotected views. OTOH, in that case, the 'authenticated_userid' would be None (and not raise an error). What version of Pyramid are you running? The 'authenticated_userid' attribute was added to the request in 1.5a3. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSPE6IACgkQ+gerLs4ltQ6bKgCg2b7VOJxiJwDnFAUH86BqRQA0 EVIAn30ejR+C9kS7NzDAx7VVCfVN129m =wzlv -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: How to correctly set then access authenticated_userid from tests?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/15/2014 05:22 AM, pyramidX wrote: > I have the following test method, where I add a test user to the > database, then with a DummyRequest I call my login view, then I assert > the authenticated_userid is what I think it should be. However it > returns None. > > def test_login(self): self.config = testing.setUp() > self.config.include('mymodule') self.config.add_route('home', '/') > > user = UserFactory.build(id='testid', post__password='testpassword') > DBSession.add(user) self._transaction.commit() > > request = testing.DummyRequest(post={'id': 'testid', 'password': > 'testpassword'}) view = views.login(request) > > assert authenticated_userid(request) is 'testid' # FAILS, returning > None instead of 'testid' > > The last lines of my views.login function are here. > > print(user.id) # Prints 'testid' as expected, so the user is being > retrieved correctly from the database headers = remember(request, > user.id) return HTTPFound(location=next, headers=headers) > > In my module's includeme function I have: > > def includeme(config): authz_policy = ACLAuthorizationPolicy() > config.set_authorization_policy(authz_policy) authn_policy = > AuthTktAuthenticationPolicy('', hashalg='sha512') > config.set_authentication_policy(authn_policy) > > Any idea what I'm doing wrong? 'remember' doesn't mutate the current request: it just computes headers passed to the response (so that the user will be authenticated on the *next* request). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSO8aIACgkQ+gerLs4ltQ6+IQCfRoXc6qAMYr/B6/Db0z32I5EB T7YAn3nbnDSXUyID7IMu+7JM6IvzelUt =JwAs -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: WebTest: Testing for Pyramid HTTPExceptions with WebTest and AppError
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/12/2014 08:15 PM, Kevin Engle wrote: > Is there a better way to ensure my application is throwing an > HTTPBadRequest? Pass 'expect_errors' to the app method in question, and then test the status code of the response. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSMy0gACgkQ+gerLs4ltQ68PwCeLMQk/KN971N8zhIvyldGNpv3 4QAAn0I2DNktilqUEaPc78DWc2OFInhS =9+WB -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: deciding on pyramid vs ruby
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/11/2014 02:41 PM, pyramidX wrote: > Are there companies offering professional support or consulting for > Pyramid? Agendaless Consulting (Paul Everitt, Chris McDonough, and me) is in exactly that business. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSKBhoACgkQ+gerLs4ltQ4H+ACfaGFrn/KnhbahHmDVxwA2CYug ARQAn3mg0AwcbGHzoFCI5KXHK85oyTH8 =uWM9 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: [pyramid] How is request.headers when multiple same headers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/27/2014 07:29 AM, Jimmy Thrasibule wrote: > Hello, > > I'd like to run over the request headers and concatenate all headers > with the same name in on string where each value is separated by a > comma. For example: > > Host: example.com Content-Type: text/html Custom-Header: value1 > Custom-Header: value2 Custom-Header: value3 > > I'd like from this have a dictionary in the following form: > > { 'host': 'example.com', 'content-type': 'text/html', 'custom-header': > 'value1, value2, value3', } > > So I wonder how multiple headers with the same name are represented > within Pyramid? Is it a MultiDict or a list of values? Pyramid's request derives from WebOb's request, and uses its EnvironHeaders. That class has the following docstring: """An object that represents the headers as present in a WSGI environment. This object is a wrapper (with no internal state) for a WSGI request object, representing the CGI-style HTTP_* keys as a dictionary. Because a CGI environment can only hold one value for each key, this dictionary is single-valued (unlike outgoing headers). """ So, you don't get access to the "raw" values, only what your front-end WSGI server morphs into the CGI environment. As it happens, waitress does exactly what you want, in conformance with RFC 2616[1], which says: Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded. The CGI spec[2] says: If multiple headers with the same field-name are received then they must be rewritten as a single header having the same semantics. Similarly, a header that is received on more than one line must be merged onto a single line. The server must, if necessary, change the representation of the data (for example, the character set) to be appropriate for a CGI environment variable. [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 [2] http://tools.ietf.org/html/draft-robinson-www-interface-00 Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlR6QRoACgkQ+gerLs4ltQ40aQCgqNocth024ptXPvMbaVGtCjn9 JpIAnRwYPrvI+KGsgy2K9TftqVwrgZmo =/2Lg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: pcreate: setting dir for templates
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/24/2014 06:05 AM, Ivan Sergio Borgonovo wrote: > Is there a way to specify another directory to pcreate where to find > templates? Templates are looked up via setuptools "entry points" (in a group named 'pyramid.scaffold') -- you need to install a project distribution which registers them into the virtualenv you are using. E.g., see: https://github.com/Pylons/substanced/blob/master/setup.py#L93-L94 Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlROdHIACgkQ+gerLs4ltQ4t9wCgltCKAUpQ5Y9xXTNy7c17vSm9 ShQAnirJdKuddASN7Wm59nIwESJH7by0 =MQRR -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid + ZODB persistent registry
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/13/2014 09:54 PM, Chris Rossi wrote: > My naive first take is just write a utility method: > > def find_sitemanager(context): """ Find nearest site manager, walking > back up the tree from 'context'. """ > > Then, don't use the global API, but call getUtility and queryUtility > on the local registry that you find with your utility method. (Totally untested) You could subscribe to the IContextFound event, and set the sitemanager based on context from within it: the global APIs would "Just Work" at that point. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlQ8iZEACgkQ+gerLs4ltQ5T1gCgpQ5OmVSbPJLt75WaMkxC45sR ZSkAmwU7VGul/AopE0pGQYU3LQsQ2tAG =xS7M -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: place views and add_route nearby but in different module
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/08/2014 05:09 AM, Ivan Sergio Borgonovo wrote: > On 10/08/2014 10:06 AM, tonthon wrote: >> Hi, > >> A module's includeme function is called when the module is included >> using config.include: >> >> See >> http://docs.pylonsproject.org/docs/pyramid/en/latest/api/config.html#module-pyramid.config >> >> to learn more about the config.include method. > > The nearest thing I was able to write is something like: > > ## main.py ## ... > > import views > > if __name__ == '__main__': config = Configurator() config.scan() > config.include(views) > > ... > > ## views.py ## def includeme(config): config.add_route(...) def > a_view(request): pass config.add_view(...) It's a bit awkward to > define the views inside includeme() but it works, I was expecting some > scope issue. > > The problem is once you wrap the views in a class I still haven't > been able to think a way to place the routes really near to the views > definitions. > > Still at least I can keep routes and views in the same file. You can still use the 'view_config' decorator while defining the route in 'includeme':: - %< __init__.py >%--- from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.include('.views') config.scan() return config.make_wsgi_app() from pyramid.view import view_config - %< __init__.py >%--- - %< views.py >%--- @view_config(route_name='home', renderer='templates/mytemplate.pt') def my_view(request): return {'project': 'foo'} def includeme(config): config.add_route('home', '/') - %< views.py >%--- Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlQ37PcACgkQ+gerLs4ltQ7wWACgvH+uh5kvufNtWuWLKEk/fZaX rZoAnRJEw0eFMFmic5mKL/EkPqhcXAke =CXDp -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Render only ZPT macro as view
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/28/2014 04:33 AM, Gerhard Schmidt wrote: > is there a way to the a view to only render a macro in view. The simplest would be to write a one-ilne template: and then use it as the renderer for a view which returned the source template and the macro name in its mapping: from pyramid.renderers import get_renderer from pyramid.view import view_config @view_config(name="uses_foo_macro.html", renderer="templates/one_liner.pt") def uses_foo_macro(context, request): source = get_renderer('templates/source.pt') info = {'source': source, 'macro': 'foo'} # Add other info return info Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlQn/7IACgkQ+gerLs4ltQ58gACg2oFtRJzFWEiwfbPYtpKYF81B zgEAn0TfOqWysisx+nto5yAmO+3pgY4K =KMFT -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Database connection (to cassandra) times out in a view function, but works in __init__.py
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/09/2014 04:10 AM, SamuraiNinja007 wrote: > The database works fine from the view code if I only import > SimpleClient within the same view file. This kind of implies that > importing SimpleClient (and therefore the python driver) in multiple > places is what is breaking my code. I would investigate how that module (or maybe others it imports) use globals: in particular, any globals associated with "THE" connection or its settings, state, etc. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlOXCFMACgkQ+gerLs4ltQ78/QCgrIlh5GBAXjObcxh0eVsxe0xb ZkUAoKBgjNyMFUefbZmL8BhffYY+seLE =gtFd -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: view_execution_permitted problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/27/2014 10:20 AM, Gerhard Schmidt wrote: > > Maybe I'm doing the whole thing wrong and there is a better way to do > this. Use the a 'request.has_permission' check to filter the suboboejcts, e.g.:: alllowed = [x for x in context.getClubs() if request.has_permission('view', x] Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlOEu9kACgkQ+gerLs4ltQ642gCgrMqfcOVW4io1xusYXe1V5sIq uSgAoNbqTBpK/yDRY931do9rmRtOL/D2 =ZdiH -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: How to store session data server side?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/28/2014 06:07 PM, Chris McDonough wrote: > written by two totally separate people who have never met each other > or had an opportunity to agree on a shared key name. They need to agree on more than the name: the type / range of the value matter, too (e.g., sequence-generated int's vs stringified UUIDs). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNe3eAACgkQ+gerLs4ltQ44FwCgzR+WaHiNXnpk0AprajnXckm8 MR0An1VJocE4BtzyqzmLioInBC4GGMEx =GpDY -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: How to get my projects' abspath?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/23/2014 12:50 PM, Seth wrote: > Apologies for any confusion. Basically I just want to know my app's > root path so that I can do various random things like store extra logs > there, read the pyramid.pid file, etc. > > Based on your feedback, this seems to work, unless anybody has a > better suggestion: > > from pkg_resources import resource_filename > resource_filename('myappspkgname', '') For "runtime writable" stuff, I would normally *not* use the software directory (sufficiently-hardened apps may be running as a user without permissions to create / modify files there). Instead, I use the following layout: /path/to/virtualenv_or_buildout bin/ etc/ production.ini include/ lib/ src/ myapp/ var/ log/ Only 'var' and its contents would need to be writable by the service user. So, the INI file specifies the writable directory using '%(here)s/../var'. For examples using '%(here)s', see: https://github.com/Pylons/pyramid/blob/master/pyramid/scaffolds/alchemy/production.ini_tmpl https://github.com/Pylons/pyramid/blob/master/pyramid/scaffolds/zodb/production.ini_tmpl (note that those are templates used by 'pcreate' to render a scaffold). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNYekQACgkQ+gerLs4ltQ6uQQCggiLVyYEeKMbBkfIlQb6YAA/T iwQAoJhDMfl+jjomfeWpin7cBbXyxZ/j =btgX -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Development workflow for Pyramid/Cornice REST Service + AngularJS GUI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/22/2014 08:53 AM, Achim Domma wrote: > Service and UI will be served from the same domain, so that I don't > have to care about cross domain access stuff like CORS. I would like > to have the same for my development system, so I would have to > "build" the Javasript files into my Pyramid project. You don't necessarily need to have the front-end artifacts in the same place. For instance, I've added a minimal Python stub to the JS/CSS checkout for one project. It has a 'setup.py': $ cd /path/to/frontend $ cat setup.py from setuptools import find_packages from setuptools import setup setup(name='frontend', version="0.1", description='Angular frontend', packages=find_packages(), include_package_data=True, zip_safe=False, ) and an almost-empty Python package: $ cat frontend/__init__.py def includeme(config): config.add_static_view(name='frontend', path='../src') # Let other apps reuse our library aassets. config.add_static_view(name='lib', path='../src/lib') The Angular app is in 'src', and the external dependecies are in 'src/lib'. I then pull in its static views via 'config.include("frontend")' in my Pyramid app. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNWi+IACgkQ+gerLs4ltQ7m/QCgrmgrPKwfcYzAhuWK3zjYQX32 qTgAoKiLrG23wOJLNuQgq4aC68vu6wuH =rGSg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Deploying Pyramid App on VPS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/22/2014 02:17 AM, JiaYi Lim wrote: > This is my production.ini <http://hastebin.com/zujutuloma.hs>. When I > included the [pipeline:main] section in the tutorial, I got an > ambiguous section name error, so I took it out. Only one application section can be called 'main' (whether it is an 'app:main', 'pipeline:main'). If you are using the pipeline, then rename the app: section and make it the "bottom" of the pipeline. To divide-and-conquer: if you run '../env/bin/pserve production.ini' at the command line, can you then connect to port 5000 on localhost? Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNWiF8ACgkQ+gerLs4ltQ7XVACgn7y+pYy+3RzlZVSZ27u6Dd96 jg4AoIRFXZG4gyEl5QvSLbGRP8Wb0GLc =BCK+ -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Possible to know if a reified method was called ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/17/2014 04:14 PM, Michael Merickel wrote: > However, if you're okay relying on an implementation detail of reify It's a little more than an "implementation detail": given Python's attribute lookup semantics, there really is no other way to implement 'reify' than by stashing the value in the instance dict. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNRtkAACgkQ+gerLs4ltQ7TXQCghlhMbGD4fExZ+5q5KPg/HBWR UjAAoMZjf1VIMeVix1XSShhwVpEJaqUW =QCic -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Possible to know if a reified method was called ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/17/2014 03:57 PM, wilk wrote: > > Hi, > > For db connexion I use add_request_method with reify=True. In the end > I commit only if this method was called. > > Now I use a tween and record the fact that the connexion was used or > not, it's not a problem but I wonder if there is a way to directly > know if a method was called (and reified) or not ? If the property name is present in the request instance dict, then it was reified. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNQNa0ACgkQ+gerLs4ltQ7qpQCgxIqbT8QyNE2Ty4NMcAvUWUEa h6cAmwZCoP/KEIqKzNF122mJjpWy9ZNs =PyO8 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: pkg_resources.DistributionNotFound when running pcreate
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/16/2014 02:27 AM, Marius Gedminas wrote: > On Tue, Apr 15, 2014 at 09:07:05PM -0700, Michael wrote: >> after creating a new virtualenv and installing pyramid via >> easy_install, I simply call `pcreate` and I get this error: >> >> pkg_resources.DistributionNotFound: pyramid==1.5a2 >> >> any ideas why? Python 2.7.3 Log follows: >> >> >> [michael@varga (Tue Apr 15 23:47:39) ~/src/py]% virtualenv test_env >> [michael@varga (Tue Apr 15 23:47:52) ~/src/py]% cd test_env >> [michael@varga (Tue Apr 15 23:47:55) ~/src/py/test_env]% source >> bin/activate (test_env)[michael@varga (Tue Apr 15 23:48:25) >> ~/src/py/test_env]% easy_install pyramid > ... >> Best match: pyramid 1.5 > ... >> Installing pcreate script to /Users/michael/src/py/test_env/bin > ... >> (test_env)[michael@varga (Tue Apr 15 23:48:43) ~/src/py/test_env]% >> pcreate Traceback (most recent call last): File >> "/usr/local/bin/pcreate", line 5, in > > Look closely here: you're running /usr/local/bin/pcreate instead of > /Users/michael/src/py/test_env/bin/pcreate. > > Why? I'd've assumed that sourcing the activate script would put > /Users/michael/src/py/test_env/bin/ in front of your $PATH. > > Can you try 'echo $PATH'? > > Can you try 'hash pcreate' to see if bash had the full location of it > cached from before (but I always thought changing $PATH invalidates > the bash command hash table). Or just quit relying on activate and use 'bin/pcreate' (or whatever) to ensure you are getting the one you want. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNOr1wACgkQ+gerLs4ltQ54ywCgypJfhBrd2+7s2Tox0eF0J0Zj YF0Aniv8EPo1VWZHYPyuZDTRZXQTuuz2 =OWFU -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Is it possible to define views and routes after app initialization?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/04/2014 04:07 PM, Tanner Semerad wrote: > *how do I access the Configurator object after app initialization (or > is that even allowed)?* Untested, but you can pass an existing 'registry' when creating a Configurator instance. So, something like:: from repoze.config import Configurator @view_config(route='extend_views') def extend_views(request): config = Configurator(request.registry) config.begin() config.add_route(...) #etc. config.commit() might work. Please let us know if it does. ;) Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlM/F48ACgkQ+gerLs4ltQ47hQCgqKdIuruYKtxxFX8IGcScm+/I U34Anit/aOuePA0V6hjr7GCj9hizT4Nx =7AR3 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Any way to check which renderers are available, or which renderer is currently in use?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2014 01:28 PM, Seth wrote: List all configured renderers:: from pyramid.interfaces import IRendererFactory def list_renderers(request): rf = request.registry.getUtilitiesFor(IRendererFactory) return {'renderers': dict(rf)} In the template associated with the renderer, you can get to the following: - 'render_name' will be the name of the template. - 'renderer_info' will be an instance of pyramid.renderers.RendererHelper; its 'type' attribute will be the key under which the factory was registered (e.g., '.pt', '.mako'). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlM9qA4ACgkQ+gerLs4ltQ6eDACgtS8qow1Rzc3nbTLOxUol3NY0 mDAAoM7r0dyA1q6McPrxv0F5lHJOp9CP =uIyP -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: how to return a http exception in json ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/31/2014 05:11 AM, Chung WONG wrote: > For example, there is a view returns a http exception to a request: > @view_config(route_name='route', renderer='json', > request_method='GET') def view(request): *return > HTTPUnprocessableEntity(detail='details', comment='comment', > body_template='body_template')* > > it returned a full html page ** ** *422 > Unprocessable Entity* ** ** *422 > Unprocessable Entity** body_template* ** ** is it > possible to make the return as a JSON so that the frontend can extract > the error message easily? When you return a response object, pyramid bypasses the renderer. In your case, you would need something like:: import json @view_config(route_name='route', renderer='json', request_method='GET') def view(request): error = {'message': 'Could not process entity'} return HTTPUnprocessableEntity( body=json.dumps(error), content_type='application/json') Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlM5jIkACgkQ+gerLs4ltQ7vXQCghToWo9ssPCoJrh4hZPjKi3uG 3eUAoM5ixHv6jt0p5JdvcxmZRGJcpIEd =khsO -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pyramid with traversal an BTree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/19/2014 07:49 AM, Anurag wrote: > I faced the similar problem Traversal fails as inherited class from > OOBTree doesn't persist __name__, __parent__. Similarly you can't have > other attributes also as they will not be persisted. Classes > inheriting from PersistentMapping don't have this problem and you can > have other attributes also in them apart from key/value stored in > mapping. You are correct: the '__getstate__' / '__setstate__' implementations for BTrees don't handle instance attributes outside the tree data structures. > I have defined my class to circumvent the problem ( may be for other > attributes similar approach can be taken up) class > ItemContainer(OOBTree.BTree): def __init__(self,name,parent): > super(ItemContainer,self).__init__() > > self.__name__=name self.__parent__=parent > > def additem(self,item): self[item.__name__] = item > item.__parent__=self @property def __name__(self): return > self["name"] > > @__name__.setter def __name__(self, value): self["name"] = value > > @property def __parent__(self): return self["parent"] > > @__parent__.setter def __parent__(self, value): self["parent"] = > value > > Please let me know if there is a problem in this approach. A couple of issues: - - Storing the '__name__' and '__parent__' values in the tree itself puts them in the same namespace as the items, which is probably not ideal (what if a user wants to create an item named 'parent'?) - - It won't work at all for the trees which expect constrained values (ints / floats / longs). Such trees are probably not in scope for Pyramid's normal traversal use cases, though. A better solution is to wrap the tree in another object which handles storing those attributes, and proxies item access to the tree (this is the approach taken by repoze.folder and SubstanceD). Note that overriding '__getstate__' / '__setstate__' to save the attributes is problematic because the "inner" tree nodes won't ever have them. It would *work* (assuming you worked out the details) but would be inefficient for large trees. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMpqbMACgkQ+gerLs4ltQ5QzACeMsIGNfn2yIHjrtozPoH8YKtk gPoAoMUHHFM2PubwcgdWEbQl9F728MX/ =uWIN -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Using the ZCA in a Pyramid web application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/16/2014 01:21 PM, Achim Domma wrote: > I have a growing web application which implements sophisticated search > and reporting functionality. To decouple some of our components, I > would like to use the ZCA, but I'm not perfectly sure how to do it. > > The first question would be, how to access the registry in the correct > way during startup. I would like to register some utilities and > adapters while application startup to use them later in my views. > Currently I'm using the registry property of my Configurator instance, > which seems to work, but I feel a bit unsure if it's supposed to be > used that way. Using the configurator's registry is the most flexible strategy: it allows you to have more than one application configured (e.g., stitched together by something like one of Paste's composites) without stepping on each other's use of the global registry. It is a less "Zopish" pattern, but one we find useful, especially for testing. As Mike said, have a look at SubstanceD for how that works, e.g.: https://github.com/Pylons/substanced/blob/master/substanced/principal/tests/test_principal.py#L571 > The second question would be, if I should use that registry at all? Or > should I just go for registerUtility & Co from zope.component? I will > need to adapt IRequest, but as it's a plain zope.interface.Interface, > it should not be a problem to register adapters for it in the "plain" > ZCA. If you want to use the ZCA's global API, see one of: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/zca.html#enabling-the-zca-global-api-by-using-hook-zca or: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/zca.html#enabling-the-zca-global-api-by-using-the-zca-global-registry Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMocFEACgkQ+gerLs4ltQ7dRwCfccP97z7E30zMKlQJblaXCpVr fKsAnRzxoztOVvqX9Cs92creyfyOVh1r =FEZe -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: How can i render index.html on '/' url without using view.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/17/2014 10:45 AM, Abdul Wahid wrote: > I have gone through lots pyramid docs but still don't understand that > how can I directly render and html file such index.html on '/' url > from config instance instead of writing a separate view for rendering. > http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/assets.html#root-relative-custom-static-view-url-dispatch-only Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMnEzQACgkQ+gerLs4ltQ5ENACgtJg6U/pYNt+YYBFc1Bvlmmh6 ebsAn3breO7Zx94LIb5NX1Rf03M+Hqff =G37v -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: dynamic view_name to match in traversal based app
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2014 10:49 AM, Ron Drongowski wrote: > We are creating a traversal based pyramid-app using our ZCA-based > components we designed for our CMS. So for a regular article an url > would look like this: /path/to/my_article. Traversal ends and we can > register a default view (name=''). This is easy. But, since we have a > lot of SEOs around us, we have very specific needs for custom-urls. We > were asked ro realize the scheme /path/to/my_article/page-2 for the > second page of an article. This would lead to an dynamic view_name, > which is currently not possible - even in an hybrid application, if I > understood the documentation right. I assume you could solve this > problem by either registering a lot of views, extend the traversal > (implement an __getitem__ for the article) or implement your own > request factory. All of which do not seem to be the right thing, while > a regex view-name seems to be th eright thing. Is there a solution for > this? You need 'request.subpath'[2]:: @view_config(context=MyModel, renderer='templates/mytemplate.pt') def my_view(request): end = request.subpath[-1:] if end and end[0].startswith('page-'): page = int(end[0].split('-')[1]) else: page = None pages = [] url = request.resource_url(request.context) for i in range(10): page_url = '%spage-%d' % (url, i) pages.append((i, page_url)) return {'project': 'ugh', 'page': page, 'pages': pages, } This would match for URLs such as '/@@/page-1' on the "ZODB starter" app. If you want to avoid the '@@' element in the visible path, you can add it via a new-request subscriber[2]:: from pyramid.events import NewRequest from pyramid.events import subscriber @subscriber(NewRequest) def mysubscriber(event): r = event.request last = r.path_info.rsplit('/', 1)[1] if last.startswith('page-'): page = last.split('-')[1] r.path_info = r.path_info[:-7] + '@@' + '/page-%s' % page [1] http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request.subpath [2] http://docs.pylonsproject.org/projects/pyramid/en/latest/api/events.html#pyramid.events.subscriber Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMfluQACgkQ+gerLs4ltQ73gwCg3Gn44Z9BuFnGdLTZzUr8q+y8 o1QAoMI2oW0jlzYRgtyl8Gs8pjMUKMjP =gIOO -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: pyramid and asynchronous programming
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/2014 07:43 AM, Chris Withers wrote: >> Whatever you do, keep your fingers off asyncore, that’s a complete >> turd unfortunately (hence tulip). > > Well, okay, but it's been used as the core of waitress, which is a > relatively recent innovation, so curious about that choice... waitress is your old friend zope.server / ZServer, with some modernizations[1]: its asyncore usage is battle-tested. [1] http://docs.pylonsproject.org/projects/waitress/en/latest/differences.html Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMcirIACgkQ+gerLs4ltQ6T3ACfcCt+5MAykCxkOtQ/1RChz2Xn 85MAn06PO7Ln7DgcR46RGCtshIHyx3NO =+ElF -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: (i18n) error on extract_messages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/08/2014 08:48 AM, Winston Ferreira wrote: > File "/home/winston/projects/Python-3.3.4/lib/python3.3/tokenize.py", > line 527, in _tokenize if line[pos] in '#\r\n': # skip > comments or blank lines TypeError: 'in ' requires string as > left operand, not int It looks as though the file is being opened in binary mode, rather than text mode, which makes 'line' a bytes object in Py3K. Wichert has made a bunch of changes to that code in 'lingua' since the 1.6 release: maybe he can suggest a workaround (or make a new release). Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMbTlkACgkQ+gerLs4ltQ7GhwCgqhsJWLhQmNt+YnPpRoT4cl8G K9MAoLn/H73nN1jqmTCnpapp3iq2kYgM =ap2j -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
[pylons-discuss] Re: Pycon Open spaces
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/06/2014 12:15 PM, Steve Piercy wrote: > [S]ome of the Pylons Project/Pyramid folks had non-Pyramid talks > accepted. I would avoid scheduling an open space during these times. > I might have missed a few talks below. > https://us.pycon.org/2014/schedule/presentation/53/ This one is Paul's tutorial: there are no open spaces on tutorial days. > https://us.pycon.org/2014/schedule/presentation/157/ My talk on porting to Py3k: Friday 12:10 p.m.–12:55 p.m. > https://us.pycon.org/2014/schedule/presentation/160/ Blaise's talk on WebDev toolchains: Saturday 12:10 p.m.–12:40 p.m. FWIW, I won't be able to stay for sprints this year (which sucks). Paul has to fly back Saturday to make a local Sunday commitment (which sucks more). Chris is not coming at all (which sucks most). Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMYuRsACgkQ+gerLs4ltQ4qLwCdEe9jgHOO3KPGeQp6noY3Iv4M oTQAnjUA8GXIvOFP4jadKmlfXVizso4H =mtJg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: Unknown predicate values error while rendering mako template in pyramid
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/06/2014 03:36 AM, Abdul Wahid wrote: > I don't know what i am missing and cause of this error. A couple of things first: - - Please don't trim tracebacks when reporting a problem: the full traceback has extra information to help us diagnose it. - - If your mail client cannot cope with posting indented Python code, please upload it using a service such as gist.gitub.com, and include the URL in the mail. Now to your problem: your code tries to pass 'view' and 'renderer' to the 'config.add_route()' call, which does not recognize them, and therefore treats them as unknown route predicates. If you are going to avoid using the '@view_config' decorator, you must follow the 'config.add_route' call with one or more 'config.add_view' calls[1]. E.g.:: config.add_route('home', '/') config.add_view('opensilo.views.Main', route_name='home', renderer='index.mako') [1] http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/viewconfig.html#mapping-views-using-imperative-config-section Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMYiqUACgkQ+gerLs4ltQ6B/ACdEzCGbzeG++MxVYCCANRHd79s ogwAn2sIOK/sxotu/brOdn3QK36d/z5Q =OBCf -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: pserve development.ini Issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2014 09:54 AM, Александр Орлов wrote: > Hello. I have Python 3.3.3 Try to run server pserve development.ini > And have such error: File > "C:\Python33\lib\site-packages\paste-1.7.5.1-py3.3.egg\paste\httpexceptio > > ns.py", line 634 > except HTTPException, exc: > > As i understand Paste is not working with py 3 But what have i do ? :) > Please show the whole traceback. Something in your application is depending on Paste, which pyramid does not use at all (because of its lack of maintenance / Py3k support). If you are using a middleware from Paste, you may find that there are ported versions available which do support Py3k (e.g., I forked the 'paste.urlmap' middleware to a project called 'rutter': - https://pypi.python.org/pypi/rutter - https://github.com/tseaver/rutter Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMSJm0ACgkQ+gerLs4ltQ7yngCg1RYM+RxsFyELBsGkC+1Xj5EO OBcAoKIax2DVWCWXKDsck/q+ESiVwm/j =tssW -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: zope.interface instead ABC
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/16/2014 05:12 AM, Lukasz Herok wrote: http://docs.pylonsproject.org/projects/pyramid/en/latest/designdefense.html#pyramid-uses-a-zope-component-architecture-zca-registry The key issue about ABC's vs interfaces is that ABCs are tied to an object's *class*; we often use interfaces assigned to specific instances of the class for lookup / dispatch. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMSJXEACgkQ+gerLs4ltQ5SUwCgt/ZfL0efAbHqkHnP28fAQbLK MYYAn29psoI+/7RvgGxhBqIBOj+hF9y8 =OTGs -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: basic question about views
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/20/2014 12:11 PM, zagloj wrote: > Hi, I am not sure if this is the place to ask a basic question about > how the views work, but I couldn't fin other medium (apart from irc) > and I can't fix this reading the docs. > > I have a problem with a project, I followed the tutorial (so created > my project with scaffold) but the changes I make into the views do > not take effect until I do (from my env): > > python setup.py develop > > The I launch: > > pserve --reload development.ini > > And the changes are updated, but I don't know if this is the normal > procedure, should I call setup.py develop each time I make changes to > my views? Only the changes made into the template are updating. > > Thanks in advance for your time and sorry if this is not the place > for a question like this. I use 'pserve --reload development.ini' all the time for this purpose. When you make a change to a Python file (or to 'development.ini'), you should see the server restarting itself in the console where you ran it. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMSJHYACgkQ+gerLs4ltQ7GgQCgqB6434/8G38e0uRoBeWyUMJK GpsAoNnOVf3DhAqFtGJbb7R9+rhtr+j3 =2qI9 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: calling other view callables in a view callable?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2014 10:16 AM, Tres Seaver wrote: > @view_config(route_name="combo_platter", renderer="json) def > combo_platter(request): one = ViewOne(request) two = ViewTwo(request) > return {'one': one(), 'two': two()} And of course I typoed that: it should be: return {'one': one.view_a(), 'two': two.view_b()} Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMQqfEACgkQ+gerLs4ltQ7RawCfVT0/rE+O/03civi/WJK2Eps0 Gb8AoMJ5HUhOyLUUfDQXv6jFcUklaUCu =I5wv -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: calling other view callables in a view callable?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2014 05:15 AM, Chung WONG wrote: > *@view_config(route_name="special_view', renderer='json')* *def > special_view(request)* *return {'viewA: some_dict, 'viewB': > some_dict_too}* Because you are using view classes, you need to create instances of them to call them. E.g.:: @view_config(route_name="combo_platter", renderer="json) def combo_platter(request): one = ViewOne(request) two = ViewTwo(request) return {'one': one(), 'two': two()} Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlMQqGMACgkQ+gerLs4ltQ6SlACfd+tR2FLkzHs+fr22GmMLNxRH bU4AoLDIvsXnVf3BGRUiFSCKZruYWcmE =IIDK -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: effective principals as request property
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/06/2014 09:33 AM, Antonio Beamud Montero wrote: > I need the user principals to filter a list of objets, not only the > views, but also the results must be filtered by user group. It's ok to > add a property like: > > c.add_request_method('pyramid.security.effective_principals', > 'principals', reify=True) > > and use in the request lifespan? Pyramid 1.5 already does that for you: http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/api/request.html#pyramid.request.Request.effective_principals (and deprecates the function-based APIs). Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLzqssACgkQ+gerLs4ltQ6Q2QCgy/q0ZPPDsiI/v8bAzzi4dSSh Y2cAoKFOxT2mFfaEM1elphqwZHDGytvt =Mh5r -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: http_cache via pyramid_zcml
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/06/2014 08:16 AM, Huub Bouma wrote: > I configured my pyramid views with pyramid zcml, and that's all fine. > However, I want to add a max-age caching header to a response, and > was wondering what the best way was to do this. There is no http_cache > setting in the pyramid_zcml code. Is there a reason for this other > then nobody never implemented this? (In that case I'll try to add it > to pyramid_zcml and do a pull request) That would be great -- I promise to review such a PR. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLzqX8ACgkQ+gerLs4ltQ7ujACgwrqDJrbxkPIwzSk3rEma2nIs 9JYAnjREYflkeLV5Hjnwwa/9kCYYIgXk =kjje -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: How to test if tal:repeat loop on last pass?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/27/2014 04:15 PM, Chris Rossi wrote: > Right, Chameleon supports TAL. It does not support TALES. > Expressions are all Python. Strictly speaking, TALES is supported, with a number of different expression types ('python:' being the default): http://chameleon.readthedocs.org/en/latest/reference.html#types The 'path:' expression type (which is the default TALES expression type in Zope) is the unsupported thingy here. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLm+5EACgkQ+gerLs4ltQ6UdwCg06BDGAAoOS3ZnRItna3348wd vcwAoLnN7XfSEUkT04lXVOx3xEXkkTag =EvJL -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: Error attempting ZODB + Traversal Wiki Tutorial
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/23/2014 08:37 PM, Thomas Grzybowski wrote: > Hi, > > I am attempting to run through the ZODB + Traversal Wiki Tutorial, but > when I come to Defining Views - Viewing the Application in a Browser, > when I run "../bin/pserve development.ini --reload", I run into the > following error: "cannot import name DBSession". Running > "../bin/pserve production.ini" gives the same error. > > When I run the setup test "../bin/python setup.py test -q", I get the > following: "AttributeError: 'module' object has no attribute 'views' > ". I'm not sure if this error is related to the previous. > > I have reviewed the code changes I made as per the tutorial, but > cannot find any reference to "DBSession." > > Any suggestions on how to proceed debugging would be greatly > appreciated. Ensure your project is set up as a "development egg" by running: $ ../bin/python setup.py develop That will get any needed dependencies installed, and will set up the links to ensure that your package is importable. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLh6bIACgkQ+gerLs4ltQ6tiQCgvmbxEwP+mk9oSO6/UalHHIAk WLsAoIjsDnUz810sH5ofnTbIg/HKjr6N =t5wW -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: Pyramid and Blobs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/2014 02:38 AM, Gerhard Schmidt wrote: > How do i set the zodbconnection to use a Blobstorage. Something like:: zodbconn.uri = zeo://localhost:9994?cache_size=200MB&connection_cache_size=5&blob_dir=%(here)s/../var/blobs&shared_blob_dir=true&storage=main See: http://docs.repoze.org/zodbconn/narr.html Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLffBcACgkQ+gerLs4ltQ4IJACfer4KOtNUBV1puOgDQtNahn/i FrUAnjOFs8Zn3wIVB4RNRiw0WkrbR1cl =RBPG -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: colander customize error messages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/2014 08:07 AM, Keith Brown wrote: > is it possible to customize colander error messages when schema > validation fails? You could register a custom gettext translation using 'colander/locale/colander.pt'. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLbXT8ACgkQ+gerLs4ltQ7axwCePe6GPJ4IPK5pIU8vA22Jp/5G tSwAn11b/HhsB+QvM5fjOkrE7ySZdCGc =3kVt -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: colander schema validation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/15/2014 07:27 PM, Keith Brown wrote: > Hi, > > I am using colander to validate a yaml file. > > The file looks like this > > main: color:White > > cars: Car1: - Brand:"Honda" - color:Red Car2: - Brand:"Toyota" > > Since Car2 does not have a color specified I want to inherit "main's" > color (white). Can colander do this, do shall I deserialize the > object, update the dictory and then serialize it for colander again? I'm afraid not: colander has no way to spell what in Zope-land we would call "acquired" fields. You can't even define your own node types for this, because the nodes don't have access to the "parent" data in serialization / deserialization/ Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLYeLUACgkQ+gerLs4ltQ5SpwCfSNvA1ZHJxez0lqPhheFxJsyW XfgAn2riAkjmrGMhWbgNuGYIQqFRcG4f =fgyb -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: super doesn't work on PersistentMapping
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/08/2014 03:53 AM, Gerhard Schmidt wrote: > Hi, > > I'm running into a strange problem with pyramid and traversal. > > I have a Class inheriting from three base classes. First > PersistentMapping and two of my own classes. > > In __init__ of this class I call super(MyClass, self).__init__() but > the __init__ methods of my two classes get never called. > > If i move PersistentMapping to inherit last. The __init__ methods of > both classes are called. > > Right now that's not a Problem but in the Future i might have to > override some methods of PersistentMapping by inheriting from another > class. > > Am I doing something wrong? This is a bug in PersistentMapping. Please report it here: https://github.com/zopefoundation/persistent/issues/new I just tested with both 'persistent.Persistent' (which works) and 'persistent.mapping.PersistentMapping' (which doesn't). Feel free to attach the two modules to your report. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLNoREACgkQ+gerLs4ltQ5moQCdH0j6wTDUjLQd6RjTKeZBoWpB CnQAnR8BGTUjxs75YihFi5u/zZ+ZjF05 =+j90 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out. showme_persistent.py Description: application/httpd-cgi showme_mapping.py Description: application/httpd-cgi
[pylons-discuss] Re: transaction for external APIs?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/07/2014 03:30 PM, Jonathan Vanasco wrote: > > has anyone looked into integrating external APIs with > transaction/pyramid_tm ? > > i'm thinking of migrating transactional email onto SendGrid or > PostmarkApp > > i'm wondering if anyone has done this yet. Check out 'pyramid_mailer' [1][2] for relevant examples; maybe even better, fork it and add a back-end for the API of your choice. [1] https://github.com/Pylons/pyramid_mailer/ [2] http://docs.pylonsproject.org/projects/pyramid_mailer/en/latest/ Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLMcYIACgkQ+gerLs4ltQ6ZlgCgnWZPvaRCgIMgkqpvc0qAUeqS ilAAn3QkAnqJgScIZD8W5tvq9AXq06fw =FsPz -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: Pyramid with traversal an BTree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/24/2013 04:39 AM, Gerhard Schmidt wrote: > Hi > > i'm building a web application based on pyramid and traversal in a > ZODB. So far it's working fine with Container derived from Persitent > Mapping. But some containers will get many children so i'm trying to > use a BTree based Container. So far no success. > > I've tried > > from BTrees.OOBTree import BTree from persistent import Persistent > > class container(BTree, Persistent) > > I'ts working but changes don't geht stored in the zodb. > > I there a example how to do this out there or can someone get mit a > Hint what im missing. You don't need to derive from Persistent (BTree already does that for you). For an example, you could look at SubstanceD's Folder class: https://github.com/Pylons/substanced/blob/master/substanced/folder/__init__.py Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlK5vkYACgkQ+gerLs4ltQ7v/gCeLTqTEhiuE2cUkdmckQajeQSS 20sAn3CMv0x1gn38FplK2gbQgwHYDRgE =+AAy -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: How to use pyramid_mailer.debug?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/17/2013 07:08 PM, Chung WONG wrote: > Um... What I did : > > added the pyramid_mailer requirement to setup.py then run setup.py > develop > > it is called pyramid_mailer-0.13-py2.7.egg in site-packages which > matches the doc's version. 0.13 didn't have the feature. See the github changelog: https://github.com/Pylons/pyramid_mailer/blob/master/CHANGES.txt#L8 The docs are being built from the tip of the master branch, but still show version 0.13 (because they get updated during a release). Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKx18kACgkQ+gerLs4ltQ68YgCfYTpH2dSGQjqlch1kR3QvLXf7 QYcAoKEj217YE8A+ZROuSYzw3BUtnJif =oT7s -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: How to use pyramid_mailer.debug?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/17/2013 05:53 PM, Chung WONG wrote: > The doc > <http://docs.pylonsproject.org/projects/pyramid_mailer/en/latest/> > said: > > pyramid.includes = pyramid_mailer.debug ... pyramid_debugtoolbar > pyramid_tm > > > > but I got an error with it: * ImportError: No module named debug* I > have tried to include both pyramid_mailer and pyramid_mailer.debug, > but got the same results. I guess it is a simple thing but I just > couldn't figure out what went wrong with it. Are you running with a checkout of the package? There is not (yet) a release that has that feature available. It will be in the next release soon (basically, I delegated the two remaining PRs to Chris and forgot about the project for the last week or so). Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKw2MgACgkQ+gerLs4ltQ7hbwCdEtOcmX1xWeDXs+CJgz41ne1u P3cAoJMRgTM7NIxzvzLVPeHYYLU3KCug =pjgX -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: Beaker successor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2013 01:01 PM, Mike Orr wrote: > To make ISession generic. it would have to not depend on Pyramid or > on Zope interfaces. You could use conditional imports / compatibility stubs, e.g.: try: from pyramid.interfaces import ISession except ImportError: class ISession(object): """ Stub for pyramid.interfaces.ISession. """ try: from zope.interface import implementer except ImportError: def implementer(wrapped, ifaces): """ Stub for zope.interface.implementer """ return wrapped and then have a "pyramid" extra which depended on 'pyramid' and 'zope.interface'. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKwlw0ACgkQ+gerLs4ltQ7JnQCfaw5Wx6RtLRJ/KIldyvVHvd5N rskAoLkLL4JVjeDU+Iknqq4JHDgrZE9p =Yi0R -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: WebHelpers2 status and module name question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/29/2013 01:51 PM, Mike Orr wrote: > On Tue, Oct 29, 2013 at 6:45 AM, Tres Seaver > wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> On 10/29/2013 02:10 AM, Mike Orr wrote: >> >>> there's the ongoing problem of MarkupSafe not being compatible >>> with Python 3.0 - 3.2. I'm inclined to just leave the MarkupSafe >>> dependency alone, which means if you want to use WebHelpers2 with >>> Python 3.2 you'd have to fork MarkupSafe and change all the u'' to >>> "from future import unicode_literals". >> >> FWIW, Armin rejected a PR from me that has that patch (he didn't see >> a point in supporting 3.2): >> >> https://github.com/tseaver/markupsafe/commit/553d9c3ba00e89967dfb608806f5703ef11c3f4c > >> > It would be nice to have a semi-official fork to point people to so > that they don't all have to reinvent the wheel. Can we define this > repository as it, and would you be able to support it with any needed > updates? I'm not the right person to maintain it over time -- I don't actually use Mako / markupsafe myself. My motivation was to keep pyramid (which used to depend on Mako) working on 3.2. I would be happy to have somebody else fork Armin's repo and take over my patch. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJwAPcACgkQ+gerLs4ltQ7fwgCggyJLjk7FtUSWBNvHEnU43LRJ SisAn1hVJFmpbzvO3A0qhz12lN2olf17 =TbA1 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: WebHelpers2 status and module name question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/29/2013 02:10 AM, Mike Orr wrote: > there's the ongoing problem of MarkupSafe not being compatible with > Python 3.0 - 3.2. I'm inclined to just leave the MarkupSafe dependency > alone, which means if you want to use WebHelpers2 with Python 3.2 > you'd have to fork MarkupSafe and change all the u'' to "from future > import unicode_literals". FWIW, Armin rejected a PR from me that has that patch (he didn't see a point in supporting 3.2): https://github.com/tseaver/markupsafe/commit/553d9c3ba00e89967dfb608806f5703ef11c3f4c Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJvu+oACgkQ+gerLs4ltQ6I/wCgxhMdL0lbiGqC+BHBNshfbHqX 0lUAoKx1rYcnc2Jha17Z7p9iPA5oL90t =uUrI -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: pyramid 1.4 app breaks with pyramid-mako 0.3
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/21/2013 06:43 AM, Robert Forkel wrote: > Hi, following the note on > http://docs.pylonsproject.org/projects/pyramid/en/master/whatsnew-1.5.html > that says it's fine to install pyramid-mako into older pyramid > installations, I ended up with a broken app, because as far as i can > tell, starting with 0.3 pyramid-mako doesn't take settings into > account anymore. So my "mako.directories" setting was ignored and > templates not found. So I guess this note should be removed. Could you report the issue here: https://github.com/Pylons/pyramid_mako/issues Development is pretty actitve at the moment: I bet we can get a new release out fixing your problem. Tres. - -- ======= Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJlJGwACgkQ+gerLs4ltQ4WZwCbB3ugERQU7vVLUvC9De4SJbQP /NoAoMs4f7o/2+HHYaPDeaQhqJVjIDu+ =jiMp -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: pyramid 1.5, pyvenv-3.3 and psycopg2 installation problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/22/2013 10:46 AM, Cem Ikta wrote: > > sudo apt-get install python-psycopg2 #(without errors installed) Try: $ sudo apt-get build-dep python-psycopg2 To ensure you have all build dependencies (not just installation deps). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlI/NZ0ACgkQ+gerLs4ltQ5q2wCdHYQxDmuua7CPfWy/86GS9xT9 8OUAoIHKCr2KhXfO2qxFhtIJ5LUkFq0f =22Vy -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: Documentation "high risk website blocked" message
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/09/2013 07:58 AM, Tjelvar wrote: > Dear all, > > Trying to access the Pyramid documentation results in a "High risk > website blocked". > > The details given: > > Access has been blocked to "api.grokthedocs.com" as 'Mal/HTMLGen-A' > has been found at this website. > > Anyone know what is going on? I don't know anything about the 'grokthedocs.com' domain. The canonical URL is http://docs.pylonsproject.org/projects/pyramid/en/latest/. The RTD alias for that is http://pyramid.readthedocs.org/en/latest/. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlItv1cACgkQ+gerLs4ltQ4nGACfY7kVqe31KVxZzf9Mkl+/BZ7P px8AnRiie9xNo/8IVc+/29jvdozAic80 =noah -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: WebTest 'no viable alternative at input ' using Jython
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/26/2013 06:01 PM, Sergiy Tupchiy wrote: > Hi, Sorry if it's not related question, I am trying to use WebTest lib > with Jython and on the same beginning, during import, I'm getting this > error: > > Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) [Java > HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_51 Type > "help", "copyright", "credits" or "license" for more information. >>>> import webtest > Traceback (most recent call last): File "", line 1, in > File > "/usr/share/java/jython2.5.2/Lib/site-packages/WebTest-2.0.7-py2.5.egg/webtest/__init__.py", > line 9, in from webtest.app import TestApp File > "/usr/share/java/jython2.5.2/Lib/site-packages/WebTest-2.0.7-py2.5.egg/webtest/app.py", > line 331 boundary = b'--a_BoUnDaRy' + boundary + b'$' ^ > SyntaxError: no viable alternative at input ''--a_BoUnDaRy'' > > > Does the library actually supports the Jython? And can you help to > solve this particular trouble? WebTest 2.0 dropped Python 2.5 support. You need to either use the Jython 2.7 beta, or else pin "WebTest < 2.0dev" in your project. Tres - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlIcwiIACgkQ+gerLs4ltQ7FXACfaxL1fXSVMERWDZmurNjGm1Kk TOUAnRFIfak+mjj2eCM+sTdL8RQ7aCbZ =D3h+ -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: i18n with Chameleon interaction issues
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/09/2013 01:05 PM, Hans-Peter Jansen wrote: > Dear Pylonistas && Pyramistas, > > I'm in the process of evaluating web frameworks for some simple > projects, that highly depend on forms and i18n. For the time being, I > tend to use the Pyramid framework, which is a pleasure to work with > so far. Great work, guys. > > ATM, I'm stuck with some Chameleon rendering and i18n interaction > issue. > > I started from here: > > http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/humans/forms_schemas/step02/index.html > > > and mangled it up to the point, where the form is translated > correctly apart from a small part of site_view.pt: > > Before: Valid form values: ${values.name} > and ${values.shoe_size}. > > Became: Valid > form values: ${values.name} and ${values.shoe_size}. > > Funnily, the expression is translated and displayed "correctly", but > is simply the values.* replacements missing, unlike the untranslated > version. > > I experimented with various tal:replace constructs for the values.* > expressions, which all resulted in ${values.name} for the translation > string, and consequently with the same rendering result, hence the > question: how do I formulate this in a way, that translation > finally works. I haven't done i18n with the "shortcut" spellings in Chameleon. the form I would use looks like:: Valid form values: NAME and SHOE_SIZE./p> The Plone docs for ZPT + i18n are fairly useful, even for Chameleon: http://plone.org/documentation/kb/i18n-for-developers Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlIFL9sACgkQ+gerLs4ltQ5wUACgqJBlwghjumZ6d5TlU9MLQjH0 hOgAoIJJ3B7fNEdGdMlGMSaswhiXf0Q1 =B9si -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: has anyone only used transactions for pyramid_mailer and not SqlAlchemy ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/17/2013 11:56 AM, Jonathan Vanasco wrote: > We're not using pyramid_tm for SqlAlchemy. > > We're considering using the deferred/queuing functionality of > pyramid_mailer ( instead of send_immediately ), except that introduces > zope.transaction into the mix. Although the package comes out of the Zope world, its name is just 'transaction'. If you don't add the glue (zope.sqlalchemy) which wires up the sqlalchemy session into transactions, the presence of the pyramid_tm tween should have no impact on the DB access. > Has anyone else done this ? > > I went though the code, and there doesn't seem to be a way to use the > deferred/queue without using transaction. Wondering if there are any > implications / pitfalls to look out for. If the app manually coordinates SQL transactions, but lets the tween handle mail delivery, you could in theory end up in an inconsistent state: e.g., the SQL transaction is aborted but the mail is sent, or vice versa. In such an app, I might still use the transactional mailer, but *not* use the 'pyramid_tm' tween: I would instead set up the 'transaction' moudule's transaction directly, and commit it / abort it in lockstep with the SQL transaction. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlHoafcACgkQ+gerLs4ltQ4IkgCfSK6fu1pon+cOSp12oqOJowXg yaUAoMegU5IuiVlCHHpFZ/FlRtME3mcQ =kY3I -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.