[pylons-discuss] Pyramid Debugtoolbar 3.0 released

2016-04-23 Thread Michael Merickel
Hey folks, after 2.5 was released with some incremental changes, I've released 3.0 today with a slightly larger change to the toolbar which could potentially break custom panels (if you're using any). Here are the highlights: - Updated to bootstrap v3.3.6 and moved some static assets around. -

[pylons-discuss] Pyramid 1.7b4 released

2016-05-12 Thread Michael Merickel
Pyramid 1.7b4 has been released. For those following along this will be the third beta release that I'm claiming is the last beta release. That's what I get for trying to guess. - Fixed the exception view tween to re-raise the original exception if no exception view could be found to handle the

Re: [pylons-discuss] Examples of code organisation

2016-05-17 Thread Michael Merickel
Vinicius, please subscribe to the google group if you would like your posts to stop being moderated. On Tue, May 17, 2016 at 1:22 PM, Vinicius Assef wrote: > Hi there. > > I continue studying Pyramid and I'm looking for some repos to learn how > you organise your codebase

[pylons-discuss] Pyramid 1.7b2 released

2016-05-01 Thread Michael Merickel
Pyramid 1.7b1 has been released. This is likely the last beta release. - A default permission set via ``config.set_default_permission`` will no longer be enforced on an exception view. This has been the case for a while with the default exception views (``config.add_notfound_view`` and

Re: [pylons-discuss] Pyramid 1.7b2 released

2016-05-01 Thread Michael Merickel
Sorry my copy/paste foo is no good. On Sun, May 1, 2016 at 6:26 PM, Steve Piercy <steve.piercy@gmail.com> wrote: > On 5/1/16 at 4:51 PM, mmeri...@gmail.com (Michael Merickel) pronounced: > > Pyramid 1.7b1 has been released. This is likely the last beta release. >&g

[pylons-discuss] Pyramid 1.7a1 released

2016-04-16 Thread Michael Merickel
Pyramid 1.7a1 has been released. This is the first alpha in the 1.7 series. There is one major change I want people to be aware of first: - The AuthTktAuthenticationPolicy has switched its default hash algorithm to sha512 from md5. The default of md5 had been deprecated since Pyramid 1.4. If you

Re: [pylons-discuss] Recommendations regarding session factory?

2016-04-17 Thread Michael Merickel
On Sun, Apr 17, 2016 at 5:45 AM, Christoph Zwerschke wrote: > Any recommendation for a simple session factory just to support CSRF > protection? I'm asking because the default session is unencrypted and not > recommended when security is important, and pyramid_redis/beaker don't

[pylons-discuss] Pyramid 1.7a2 released

2016-04-19 Thread Michael Merickel
Pyramid 1.7a2 has been released. There are only a couple changes in this release: - Fixed a show-stopping bug with the csrf origin checks. - Added a new config.set_default_csrf_options() API which replaces the previously announced "pyramid.require_default_csrf" setting. - CSRF checks are

Re: [pylons-discuss] Deploy Pyramid to Elastic Beanstalk

2016-07-18 Thread Michael Merickel
On Mon, Jul 18, 2016 at 12:04 PM, Andrew Burnett wrote: > I had tried that previously but was met with the error: > > 'failed, because: Directory '.' is not installable. File 'setup.py' not > found.' > > Which I didn't understand because requirements.txt exists in the root

Re: [pylons-discuss] Deploy Pyramid to Elastic Beanstalk

2016-07-18 Thread Michael Merickel
On Mon, Jul 18, 2016 at 11:43 AM, Andrew Burnett wrote: > You're a savior! I can't tell you how appreciate I am. What a bonehead > move on my part, leaving out that command; nevertheless, adding the > `setup.py develop` call in .ebextension did the trick! If you're using

Re: [pylons-discuss] Deploy Pyramid to Elastic Beanstalk

2016-07-17 Thread Michael Merickel
I don't have any beanstalk experience but this is definitely a path/virtualenv issue. I'd add some code to output your sys.path and it should be clear why your code is not available. It sounds like your dependencies were installed but the package itself is not on the path. On Sun, Jul 17, 2016 at

Re: [pylons-discuss] How to add custom headers to static view?

2016-07-08 Thread Michael Merickel
Easiest option is to just add a tween or NewResponse subscriber to your app that handles responses from that url prefix. If you don't like hard-coding the url prefix, then another option is to use a route factory on the static view which can annotate the request. You can then use this info in a

Re: [pylons-discuss] remote_user

2016-07-06 Thread Michael Merickel
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,

[pylons-discuss] Pyramid 1.6.2 released

2016-08-15 Thread Michael Merickel
Pyramid 1.6.2 has been released. This is a bugfix release with some minor changes: - Fixed a bug in proutes such that it now shows the correct view with a class and attr is involved. - The JSON renderers now explicitly encode their result as utf-8. - Renderers will now warn the user and encode

[pylons-discuss] Pyramid 1.7.1 released

2016-08-15 Thread Michael Merickel
Pyramid 1.7.1 has been released. Here are the highlights: - Correct the column type used for page in the SQLAlchemy + URL Dispatch tutorial by changing it from Integer to Text. - Fix a bug in which the ``password_hash`` in the SQLAlchemy + URL Dispatch tutorial was sometimes being treated

[pylons-discuss] Pyramid 1.6.3 and 1.7.2 released

2016-08-16 Thread Michael Merickel
Oops, Pyramid 1.6.3 and 1.7.2 have been released to fix a regression introduced which caused the JSON and JSONP renderers to return bytes instead of unicode when invoked directly. Enjoy, and please report any issues you find to the issue tracker at https://github.com/Pylons/pyramid/issues

[pylons-discuss] Pyramid 1.6.4 and 1.7.3 released

2016-08-17 Thread Michael Merickel
Pyramid 1.6.4 and 1.7.3 have been released because I can't build things. Specifically the wheels for 1.6.3/1.7.2 had build artifacts from previous releases in them as a result of me not cleaning up my build folders between releases. Sorry folks. Enjoy, and please report any issues you find to

Re: [pylons-discuss] Project for GSoc 2017

2017-02-03 Thread Michael Merickel
Please see my response here: https://groups.google.com/d/msg/pylons-discuss/MS2yLiYIxJM/JseewNsiDQAJ You would need to talk to me about a specific project that could be completed prior to September. - Michael On Fri, Feb 3, 2017 at 4:37 PM, satyaki sen wrote: > Dear

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-23 Thread Michael Merickel
If the package has code in its `__init__.py` then it is no longer a real namespace package and I think you've been getting "lucky" for this long probably due to the order in which the packages were installed. A namespace package is a grouping of submodules/subpackages, but the top-level module in

[pylons-discuss] Pyramid 1.6.5, 1.7.4 and 1.8.1 released

2017-01-24 Thread Michael Merickel
Hey folks, I've flushed the backlog of minor changes pending on 1.6, 1.7 and 1.8 branches. 1.8.1 restores support for extra Registry parameters which were removed in 1.8. Check the "What's New in Pyramid 1.8" for more information about 1.8.1:

Re: [pylons-discuss] GSoC 2017

2017-01-30 Thread Michael Merickel
Hey Hareesh! Pylons has had students in previous years complete successful projects. However we have only participated after a motivated student approached us to get the ball rolling. GSOC is almost entirely student-driven. If a student is interested in working on a project that falls into our

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-25 Thread Michael Merickel
On Wed, Jan 25, 2017 at 6:32 AM, Laurent DAVERIO wrote: > OK, it works, provided I reinstate the symlink: > > ldc/ldc/shop --> ldc.shop/ldc/shop > > Python namespace packages are really kludgy, it's a disappointment. > Python is usually smarter... > I won't deny that

[pylons-discuss] Pyramid 1.8 released

2017-01-21 Thread Michael Merickel
Pyramid 1.8 has been released! There are no notable changes from 1.8b1. Special thanks go to Carlos De La Guardia for all of his work rewriting the official Pyramid scaffolds into cookiecutters. A "What's New In Pyramid 1.8" document exists at

Re: [pylons-discuss] Re: Pyramid 1.8 released

2017-01-21 Thread Michael Merickel
On Sun, Jan 22, 2017 at 1:45 AM, Jaime Sangcap wrote: > But I think the links are pointing to 1.7 Argh... I thought I was doing so well copy/pasting an old release email in gmail. The correct links are below.

[pylons-discuss] Pyramid 1.8.2 released

2017-02-19 Thread Michael Merickel
Pyramid 1.8.2 has been released. This is a minor bugfix release in the 1.8 series. - HTTPException objects will case their detail argument to a string inside __str__ to conform to that protocol. See https://github.com/Pylons/pyramid/pull/2951 - Configurator(settings=settings) will make a copy of

[pylons-discuss] Pylons Project GSoC 2017

2017-02-09 Thread Michael Merickel
Hey folks, we've had a couple requests by students to apply for GSoC 2017 so I've added our name to the list of projects at http://python-gsoc.org under the PSF. Bert (x58) and I (raydeo) on #pyramid are available to chat about ideas, and we welcome anyone else who may want to act as a student or

Re: [pylons-discuss] pyramid_tm custom data mangers for a transaction

2017-01-23 Thread Michael Merickel
The best resource I know is http://zodb.readthedocs.io/en/latest/transactions.html along with staring at various implementations of data managers. A good one to look at would be zope.sqlalchemy which is the data manager implementation for sqlalchemy sessions. There is also repoze.sendmail with a

[pylons-discuss] Pyramid 1.8b1 released

2017-01-17 Thread Michael Merickel
Pyramid 1.8b1 has been released. This is likely the one and only beta release unless any bug reports come in the next week or so. If not, expect 1.8 before the end of the month. There have been only very minor changes from 1.8a1 including several documentation improvements to replace more pcreate

[pylons-discuss] Re: Pylons Project GSoC 2017

2017-02-28 Thread Michael Merickel
something out. - Michael On Thu, Feb 9, 2017 at 10:16 AM, Michael Merickel <mmeri...@gmail.com> wrote: > Hey folks, we've had a couple requests by students to apply for GSoC 2017 > so I've added our name to the list of projects at http://python-gsoc.org > under the PSF. Bert (x58

Re: [pylons-discuss] troubleshooting 1.7.4 - 1.8 migration

2017-02-27 Thread Michael Merickel
I can't see pyramid haven't anything to do with this. Especially if you aren't using "pserve --reload" which is a new dependency in 1.8 used only during reloading. What other dependencies / versions changed as part of your migration? Are you using gevent? On Mon, Feb 27, 2017 at 4:27 PM, Jonathan

Re: [pylons-discuss] view_config's wrapper - example?

2016-09-13 Thread Michael Merickel
It has very very limited use. You can see exactly what it does from its implementation as a view deriver. https://github.com/Pylons/pyramid/blob/4acd85dc98fb2a43eae54d2116cc4bf383157269/pyramid/viewderivers.py#L216-L233 On Tue, Sep 13, 2016 at 12:28 PM, Jonathan Vanasco

[pylons-discuss] pyramid_tm 1.0 released (and more)

2016-09-12 Thread Michael Merickel
Hey folks, I've cut a 1.0 release of pyramid_tm. There was only one small change between 0.12.1 and 1.0 adding the `environ['tm.active']` boolean and an AttributeError when `request.tm` is accessed outside of the tm boundary. You can install the new version using pip. pip install

Re: [pylons-discuss] How to resolve the add_route URLs conflict

2016-09-21 Thread Michael Merickel
There are several reasons you can get a 404. Have you tried enabling notfound debugging[1] or using the pviews command-line to see what you get? You can also enable route match debugging explicitly to see if it's an issue with routes, but likely it's not anything to do with the code you've pasted.

Re: [pylons-discuss] Pyramid 1.7.3 Using HTTPFound exception for JSON response when resource not found in backend database.

2016-12-15 Thread Michael Merickel
On Thu, Dec 15, 2016 at 12:06 PM, 'dcs3spp' via pylons-discuss < pylons-discuss@googlegroups.com> wrote: > Cheers Michael. Thanks for responding :) > > Can't seem to locate where request is favouring HTML over > application/json. I have tested using curl request to set the accept and >

[pylons-discuss] Pyramid 1.8a1 released

2016-12-25 Thread Michael Merickel
Pyramid 1.8a1 has been released. Here are the major changes: - Added `@exception_view_config` and `config.add_exception_view` for registering exception views. These features are used by notfound and forbidden views already and should be used by your code as well! - `pserve --reload` is using

[pylons-discuss] plaster 0.3 and plaster_pastedeploy 0.1

2017-03-27 Thread Michael Merickel
Hey folks, I'm happy to announce plaster and plaster_pastedeploy. Plaster is a new library that operates as an agnostic wrapper around arbitrary configuration loaders. It can be used by any application and ships with no opinion on actual file format or source but rather offers a standard way to

Re: [pylons-discuss] Mentoring

2017-03-25 Thread Michael Merickel
Jaime, for DI please look at pyramid_services. It is actually more service locator but if you squint it is basically DI when you avoid passing the request between services. It is the closest to DI that I have seen for Pyramid without actually munging the view arguments.

Re: [pylons-discuss] Re: pyramid_beaker needs a maintainer

2017-03-20 Thread Michael Merickel
On Mon, Mar 20, 2017 at 3:48 PM, Jonathan Vanasco wrote: > > * beaker is not actively maintained, and has not been for years > This is no longer true and hasn't been for maybe a year. > * pyramid handles the client-side sessions natively Beaker works with

[pylons-discuss] pyramid_beaker needs a maintainer

2017-03-20 Thread Michael Merickel
Hey folks, pyramid_beaker is a very thin wrapper around beaker. It has a few pending pull requests and such, but no major issues AFAIK. It would be helpful if someone wanted to step up and review / fix things and push a release. Feel free to contact me directly if you'd like access to the github

Re: [pylons-discuss] Problem with Pyramid 1.8 and pdb session

2017-03-15 Thread Michael Merickel
My first impression is that I don't think this has anything to do with upgrading. If you're using a browser that makes 2 parallel requests to the endpoint that triggers pdb then you will run into really weird issues where you have two pdbs running at once. However, this has pretty much always been

[pylons-discuss] pyramid_tm 2.0 released

2017-04-10 Thread Michael Merickel
Hey folks, pyramid_tm 2.0 has been released. This is a semi-major change to the library which manages your transactions. The major change is that the commit (or abort) now occurs OVER the exception view which means the transaction is still open during exception views. This means that: 1) You can

Re: [pylons-discuss] Re: plaster 0.3 and plaster_pastedeploy 0.1

2017-04-19 Thread Michael Merickel
On Wed, Apr 19, 2017 at 11:56 AM, Jonathan Vanasco wrote: > this looks pretty great. have you spoken with the maintainers of uwsgi / > gunicorn / etc about plaster support yet? > Thanks - I have not. I imagine they would depend on plaster instead of pastedeploy and then

Re: [pylons-discuss] about pserve --stop-daemon --pid-file

2017-04-23 Thread Michael Merickel
I sympathize that no one has given an option that works on windows with python 3. I only know of a few solutions: 1) Just stop trying to use a process manager inside your process manager. Use the windows service as is to start/stop things as it is intended to do. 2) Use python 2 to run

Re: [pylons-discuss] [GSoC '17] Colander Serialization

2017-03-09 Thread Michael Merickel
Hey Parth! The biggest issue is that we want to improve Colander but we don't want to leave current users in a pickle so compatibility is a big concern. Colander is heavily used by a few different projects that we care a lot about. Cornice and Deform are the first 2 that come to mind. Research

Re: [pylons-discuss] [GSoC '17] Colander Serialization

2017-03-09 Thread Michael Merickel
On Thu, Mar 9, 2017 at 10:57 PM, Parth Verma wrote: > You talked about also applying for other projects. Does that mean other > pylons projects or other orgs? > Both! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group.

Re: [pylons-discuss] a friendly warning about upcoming changes to pyramid_tm

2017-03-03 Thread Michael Merickel
On Fri, Mar 3, 2017 at 10:10 AM, Mike Orr wrote: > The biggest problem with pyramid_tm I've run into is wanting to > rollback or commit the accumulated changes within the view without > messing up the global transaction outside the view. Normally when you > commit

Re: [pylons-discuss] Hello world and Starter Pyramid on AWS

2017-03-11 Thread Michael Merickel
come >>> through the #pyramid IRC channel. >>> >>> --steve >>> >>> >>> On 3/11/17 at 2:50 PM, wpu.cl...@gmail.com (Dan) pronounced: >>> >>> Hi all, >>>> >>>> I spent some time over the last week or

[pylons-discuss] Pyramid 1.8.3 and 1.7.5 released

2017-03-12 Thread Michael Merickel
Hey folks, I just released new bugfix versions - Pyramid 1.7.5 and 1.8.3. 1.8.3 Changes: - Allow calling ``pyramid.scripts.pserve.main`` directly. This was a regression from 1.7 and allows embedding the pserve command more easily. - Fixed a couple memory leaks that have been present for a

Re: [pylons-discuss] Re: a friendly warning about upcoming changes to pyramid_tm

2017-03-06 Thread Michael Merickel
On Mon, Mar 6, 2017 at 10:56 AM, Jonathan Vanasco wrote: > two comments: > > 1. have you considered marking `pyramid_tm` as end-of-life, and pushing > for the new changes as `pyramid_transaction` or some other uniquely > different name? > Mikko already commented on this

[pylons-discuss] a friendly warning about upcoming changes to pyramid_tm

2017-03-02 Thread Michael Merickel
Hey folks, I want to warn the community about an upcoming change to pyramid_tm that has been a long time in the making. I'm excited about it - but I also don't want to blindside anyone with a large-ish backward incompatible change. TLDR - You may want to pin 'pyramid_tm < 2.0' until you have a

Re: [pylons-discuss] config in config files?

2017-08-03 Thread Michael Merickel
pserve and all pyramid tools use plaster under the hood as of 1.9. plaster was a significant enough redesign from montague that it felt like it warranted being a new library. - Michael On Thu, Aug 3, 2017 at 4:06 PM, Chris Withers wrote: > Hey Steve, > > Hope it's all going

[pylons-discuss] Pyramid 1.8.5 and 1.9.1 released

2017-07-13 Thread Michael Merickel
Hey folks, I just released new bugfix versions - Pyramid 1.8.5 and 1.9.1. The primary bugfix in these releases was to fix a circular import issue in pyramid.viewderivers. We also backported a feature to 1.9.1 to allow customizing the venusian category which can help to control which decorators

Re: [pylons-discuss] Log messages are logged twice on the console.

2017-07-23 Thread Michael Merickel
Remove the console from handlers on logger_project_name as that logger is configured to propagate logs up the tree, meaning the root is logging it as well. On Sun, Jul 23, 2017 at 1:54 PM, Srikanth Bemineni < bemineni.srika...@gmail.com> wrote: > Hi, > > Every message that I log for debugging

Re: [pylons-discuss] Request finalizer runs *after* tweens finish

2017-04-28 Thread Michael Merickel
On Fri, Apr 28, 2017 at 1:25 PM, Theron Luhn wrote: > Do you know the motivation for pyramid_tm to be above EXC_VIEW by > default? I moved it below EXC_VIEW since I wanted commit errors to be > handled by the exception views. Is there any reason why I shouldn’t do > this?

Re: [pylons-discuss] Request finalizer runs *after* tweens finish

2017-04-28 Thread Michael Merickel
Sorry this isn't clear but pyramid_retry is not a tween. On Fri, Apr 28, 2017 at 1:45 PM, Bert JW Regeer wrote: > Here is the motivation for that: > > https://github.com/Pylons/pyramid_tm/pull/55 > > When Pyramid 1.9 drops, you’ll want to have the following: > > rollbar ->

Re: [pylons-discuss] config in config files?

2017-08-07 Thread Michael Merickel
You need to write a loader for plaster that can handle yaml files and the loader needs to satisfy the plaster.interfaces.IWSGIProtocol. No one has stepped up quite yet to write any alternate file format loaders so you're on your own there. The ability to do so is what's supported now. That loader

[pylons-discuss] pyramid_debugtoolbar 4.0 released

2017-05-02 Thread Michael Merickel
Hey folks, the debugtoolbar has undergone a massive number improvements. Most of the changes are under the hood or for debugtoolbar addon developers that want to provide custom panels. Here are the user-facing highlights: - The toolbar now keeps the same panel active when switching between

Re: [pylons-discuss] Re: Feedback needed from Agendaless Consulting on copyright, trademark, etc issues

2017-05-14 Thread Michael Merickel
On Sun, May 14, 2017 at 8:46 PM, Andrey Tretyakov wrote: > The best would be to separate docs /PR material from the software code. > It doesn't even have to have same license. > The most important thing for opensource writers is giving credit, that's > why > many people like

[pylons-discuss] Re: Pyramid 1.9a2 released

2017-05-14 Thread Michael Merickel
week of May. Thanks! - Michael On Tue, May 9, 2017 at 1:53 AM, Michael Merickel <mmeri...@gmail.com> wrote: > Hey folks, this is a very minor release on top of 1.9a1. > > - The exception view tween was updated to use > ``request.invoke_except

Re: [pylons-discuss] Re: Pyramid 1.9a2 released

2017-05-14 Thread Michael Merickel
On Sun, May 14, 2017 at 11:01 PM, Steve Piercy wrote: > Damn, we're good! Pyramid 1.9 will come with a time machine! > Hmm yes... first week of June of course! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To

[pylons-discuss] Pyramid 1.9a2 released

2017-05-09 Thread Michael Merickel
Hey folks, this is a very minor release on top of 1.9a1. - The exception view tween was updated to use ``request.invoke_exception_view`` logic. - ``request.invoke_exception_view`` will now leave ``request.exception`` and ``request.exc_info`` set if a response was successfully rendered for the

Re: [pylons-discuss] How to use Pyramid's add_view dynamically add CORS handler views based on views we had in config?

2017-06-08 Thread Michael Merickel
On Thu, Jun 8, 2017 at 12:11 AM, Fang-Pen Lin wrote: > Kind of able to do what I want, but still, it's not really ideal, as it > applies to the whole app. Sometimes, I want to have fine-grand control over > CORS for different endpoints. > > For example, I may can define

[pylons-discuss] Pyramid 1.9b1 released

2017-06-19 Thread Michael Merickel
Hey folks, I'm happy to announce 1.9b1. If there are no issues with this release, expect the final in a week or so. This release has several excellent contributions from the Pycon 2017 sprints. Thanks everyone! In a change of pace, I've decided to avoid providing a summary of changes here and

Re: [pylons-discuss] Re: Testing with pyramid_services

2017-06-20 Thread Michael Merickel
Hey Mark! The `request.find_service` method is a request method... these are not enabled by default as they are extensions to the individual request instance. You can use `pyramid.request.apply_request_extensions(request)` to make this happen in your setup code (after calling

Re: [pylons-discuss] Logging out with AuthTktAuthenticationPolicy

2017-06-21 Thread Michael Merickel
On Wed, Jun 21, 2017 at 1:42 PM, Bert JW Regeer wrote: > AuthTkt goes a step further in that it stores the userid/username and > signs it, so it can’t be spoofed, but there is no expiration server side, > that is where having a ticket server side comes in. > In an attempt to

Re: [pylons-discuss] Re: SQLAlchemy scoped_session not removed by transaction manager

2017-06-22 Thread Michael Merickel
Even if the session object is the same (which it is) I believe transactional state has been properly cleaned up by zope.sqlalchemy invoking rollback/commit/close on the session itself. However the session and any strong refs it's storing may never be released. As far as I know this shouldn't

[pylons-discuss] Pyramid 1.9 released

2017-06-26 Thread Michael Merickel
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

Re: [pylons-discuss] Re: Pyramid 1.9b1 released

2017-06-20 Thread Michael Merickel
On Tue, Jun 20, 2017 at 10:40 AM, Jonathan Vanasco wrote: > has anyone written a migration guide for the CSRF stuff yet? > I guess I felt like the notes at [1] were fairly informative. What did you have in mind? In reality the biggest change in this release is how

Re: [pylons-discuss] Pyramid 1.9b1 released

2017-06-20 Thread Michael Merickel
On Tue, Jun 20, 2017 at 11:38 AM, Mike Orr wrote: > > has anyone written a migration guide for the CSRF stuff yet? > > One question is, how do you configure one handling class or another? > How is the default legacy handler set, and will it always be so or > should we do

Re: [pylons-discuss] Anyone going to pycon?

2017-05-18 Thread Michael Merickel
I'm here now through Tuesday as well. Since we don't have a booth this year we should probably try to organize an open space if anyone is interested in taking those reigns. At the very least I plan on sprinting and I think there are a lot of good topics [1][2][3] for people to work on if they want

Re: [pylons-discuss] can i add something to the pyramid logging ?

2017-05-30 Thread Michael Merickel
Yes, but to do so you need to read the logging documentation and come up with an approach that works for you in the Python stdlib logging module [1]. One option is to configure a filter and another is a logging adapter or even a custom formatter. The simplest approach is probably a custom

[pylons-discuss] pyramid_debugtoolbar 4.1 released

2017-05-30 Thread Michael Merickel
Hey folks, this new debugtoolbar release contains some cool user-facing features unlike 4.0 which was mostly under the hood. By far the most exciting feature (to me) is that you can now interactively debug exceptions that were squashed by an exception view. This is subtle, but as an example - if

Re: [pylons-discuss] can i add something to the pyramid logging ?

2017-06-01 Thread Michael Merickel
On Thu, Jun 1, 2017 at 11:52 AM, Jeff Dairiki wrote: > You might also look at the pyramid-log > package. I think it will do > what you want. > Jeff, this library looks very nice. You should add it to

[pylons-discuss] pyramid_tm 2.1 released

2017-06-07 Thread Michael Merickel
Hey folks, this is a small but important release. In pyramid_tm 2.0 we moved the tween OVER the EXCVIEW tween - this meant that any exceptions raised by commit/abort would no longer be caught by your exception views. This release fixes that (when running on Pyramid 1.7+) by explicitly rendering

[pylons-discuss] Pyramid 1.7.6 and 1.8.4 releases

2017-06-11 Thread Michael Merickel
Hey folks, I just released new bugfix versions - Pyramid 1.7.6 and 1.8.4. 1.8.4 Changes: - Fix a bug in which pyramid.security.ALL_PERMISSIONS failed to return a valid iterator in its __iter__ implementation. There was no behavior in Pyramid relying on this bugfix. - Pin cookiecutter

[pylons-discuss] Pyramid 1.9a1 released

2017-05-01 Thread Michael Merickel
Hey folks, this is the first alpha release in the Pyramid 1.9 series. This release contains some exciting new features with no known backward incompatibilities. - Added a new execution policy hook that can be used by plugins to control the entire execution cycle of a request. The first

Re: [pylons-discuss] How to use 'createObject'?

2017-09-13 Thread Michael Merickel
I know almost nothing about what you just asked but I will point you to https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/narr/zca.html#using-the-zca-global-api-in-a-pyramid-application as well as the `config.hook_zca` method. - Michael On Wed, Sep 13, 2017 at 12:20 PM, Julian

Re: [pylons-discuss] Pyramid_tm reason for ROLLBACK

2017-10-06 Thread Michael Merickel
If you have successfully set the sqlalchemy.* loggers to DEBUG you should be seeing tons of output. Ensure that you've configured the level on the correct loggers. For example, the pyramid cookiecutters ship with a separate config for sqlalchemy that overrides the default root logger level. -

Re: [pylons-discuss] Proper handling of views for ACL roles

2017-10-15 Thread Michael Merickel
It seems you're asking about how to affect the "view lookup" [1] phase of the request. https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/narr/router.html The "permission=" is not a predicate and thus cannot be used as part of view lookup to select between various views. The way to do

Re: [pylons-discuss] Proper handling of views for ACL roles

2017-10-16 Thread Michael Merickel
multiple roles for the predicate? > > Cheers, > Jens > > > On Monday, October 16, 2017 at 11:04:56 AM UTC+10, Michael Merickel wrote: >> >> It seems you're asking about how to affect the "view lookup" [1] phase of >> the request. >> >> ht

Re: [pylons-discuss] CSRF checking in Webtest

2017-09-25 Thread Michael Merickel
> So what's the best way forward? I think you covered your options pretty well. 1) Set wsgi.url_scheme to "http" as origin checks are only done on https. 2) Set the pyramid.csrf_trusted_origins as you are doing now. 3) Disable csrf checking for your tests. I think it's just a helpful reminder

Re: [pylons-discuss] CSRF checking in Webtest

2017-09-26 Thread Michael Merickel
10:40 PM, Mike Orr <sluggos...@gmail.com> wrote: > > On Mon, Sep 25, 2017 at 9:00 PM, Mike Orr <sluggos...@gmail.com> wrote: > >> On Mon, Sep 25, 2017 at 5:47 PM, Michael Merickel <mmeri...@gmail.com> > wrote: > >>>> So what's the best way forward? > &g

Re: [pylons-discuss] CSRF checking in Webtest

2017-10-11 Thread Michael Merickel
ed my code thus: > > ``extra_environ = {"HTTP_HOST": "localhost:443", "wsgi.url_scheme": > "https"} > apptest.webtest.TestApp(app, extra_environ=extra_environ)'' > > > On Wed, Oct 11, 2017 at 3:51 PM, Mike Orr <sluggos...

Re: [pylons-discuss] content_type application/problem+json

2017-11-15 Thread Michael Merickel
> The issue I think here is that he is “raising” the HTTPNotFound() instead of just returning it. At some point this HTTPNotFound that you’ve created needs to be sent back as a response. Ok first, Pyramid already has a HTTPException handler which will catch and return the exception as a response

Re: [pylons-discuss] Re: How to handle DB transaction failures/request race conditions

2017-11-27 Thread Michael Merickel
Jonathan gives a pretty good description of how the packages fit together. He left one out, however, which I'll mention. https://docs.pylonsproject.org/projects/pyramid-retry/en/latest/ pyramid_retry wraps pyramid_tm and looks for failed transactions that failed due to some

Re: [pylons-discuss] is there an easy way to handle a unique http and https CSRF tokens ?

2017-12-04 Thread Michael Merickel
> I'm in the process of migrating to the new cookie based csrf policy, and it doesn't seem like there is an easy way to run different tokens on HTTP vs HTTPS short of writing a new ICSRFStoragePolicy utility and plugin. Has anyone worked on this before? Specialized use-cases are the reason we

Re: [pylons-discuss] Re: CSRF token implementation

2017-12-12 Thread Michael Merickel
Comparing two cookies defeats the entire purpose of csrf protection. Csrf is meant to make it difficult for someone who does not have access to your session to forge requests on behalf of that session. Since cookies are almost always sent along with cross origin requests it means you cannot use

Re: [pylons-discuss] SessionAuthenticationPolicy callback calls

2017-11-16 Thread Michael Merickel
The policy is invoked anytime request.authenticated_id is requested which includes request.effective_principals which would occur for any call to request.has_permission. A common approach is to create request.user which is reified from request.unauthenticated_userid and then you configure

Re: [pylons-discuss] content_type application/problem+json

2017-11-16 Thread Michael Merickel
refox, and > changing the content_type won't work.(e.g. Chrome can handle that) > I kicked out the Selenium/Firefox tests > > But finally this is a REST-API...so curl and chrome should be enough. > > Regards, > Sascha > > @All: Thx > > > > Am Mittwoc

Re: [pylons-discuss] Static Files on Elastic Beanstalk

2017-11-03 Thread Michael Merickel
I would guess that you need to provide a more specific path to the files... I have no idea what the CWD is for that yaml file and whether `static/` is enough... I would guess that it needs to be something like `myapp/static/` at the very least to point to a location on disk relative to the root of

Re: [pylons-discuss] How to enable JSON renderer as default for all views?

2017-11-06 Thread Michael Merickel
201 # Created > return None > > instead of returning a HTTPCreated() here? > > Thank you! > Jens > > > On Thursday, November 2, 2017 at 1:48:02 AM UTC+10, Michael Merickel wrote: >> >> This renderer feature does not override the other one which is "if

Re: [pylons-discuss] Attaching custom header to all responses

2017-11-06 Thread Michael Merickel
A fourth (and probably best way in this case) is to register a NewResponse subscriber. Another global hook is to add a tween. A good hook that allows certain views to opt-out or opt-in to something is a view deriver. They all affect different parts of the pipeline [1] but a NewResponse subscriber

Re: [pylons-discuss] How to enable JSON renderer as default for all views?

2017-11-01 Thread Michael Merickel
This renderer feature does not override the other one which is "if you return a Response object then no renderers will be invoked". HTTPOk is a Response subclass. This is covered in the first few paragraphs of the renderer chapter. I'd be open to a PR that clarified the docs on this in the section

[pylons-discuss] hupper 1.3 released

2018-05-21 Thread Michael Merickel
Hupper 1.3 has been released with watchman support! It will automatically use watchman if you have it installed. The full changelog is here: https://docs.pylonsproject.org/projects/hupper/en/latest/changes.html You can install it via PyPI: pip install hupper==1.3 Enjoy, and please report any

Re: [pylons-discuss] Pyramid LDAP 0.3.1.post1 has been released.

2018-05-15 Thread Michael Merickel
https://docs.pylonsproject.org/projects/pyramid_ldap/en/latest/#changelog Sweet, python 3 support! On Tue, May 15, 2018 at 4:28 PM, Christopher Morales < christopherhmora...@gmail.com> wrote: > pyramid_ldap 0.3.1.post1 has been released. > > Here are the changes: > > -

Re: [pylons-discuss] Suggested way to issue requests from inside a view callable

2018-05-01 Thread Michael Merickel
requests is great and is what I use. There is a little-known feature in webob that probably deserves a mention though. You can build a webob.Request object and call send() or get_response() on it to get back a webob.Response object from the third party. It uses the stdlib http.client under the

Re: [pylons-discuss] Can you help me get jinja2 to render {{thing.a}}

2018-02-13 Thread Michael Merickel
Craig, The subprocess is returning a json-encoded string. This is a string. You must parse it first via json.loads(subprocess.check_output(...)) if you want to use the objects it contains in your template. Similarly you said it's working with renderer="json" but it's actually not. You're

Re: [pylons-discuss] Re: New Package for Integrating Mongodb

2018-07-28 Thread Michael Merickel
You don't really need a config variable if done correctly, other than what pyramid_debugtoolbar already supports. The panel should be enabled only if a user does something like `debugtoolbar.includes = pyramid_mongodb.debugtoolbar`. On Sat, Jul 28, 2018 at 1:05 AM Jonathan Mackenzie wrote: >

Re: [pylons-discuss] Relationship between requests and Zope transactions

2018-09-01 Thread Michael Merickel
Jens, by default your example is true, but it is not true in the cookiecutter configuration. The value of request.tm is defined by the tm.manager_hook setting and by default it is the threadlocal transaction.manager. The cookiecutter overrides the hook (and I suggest you do as well) to define a

Re: [pylons-discuss] Relationship between requests and Zope transactions

2018-09-07 Thread Michael Merickel
> > Added yet another one or two parameters (sigh) to functions, but it keeps > things functional and without outside (global, thread-local) state. This is where something like pyramid_services [1] really excels. It'll drastically cut down on concerns like that when you adopt some form of

<    1   2   3   4   5   6   7   >