Re: [pylons-discuss] JSON data no reaching my view

2014-12-10 Thread Michael Merickel
Can you intercept the request in your browser and see if the content-type and body are actually correct? request.json_body only works on application/json -ish content types by default. On Wed, Dec 10, 2014 at 9:31 AM, Rosciuc Bogdan wrote: > I did use the request.json_body but it gives back an er

Re: [pylons-discuss] What should go in main vs includeme functions in __init__.py?

2014-12-16 Thread Michael Merickel
On Tue, Dec 16, 2014 at 5:48 AM, pyramidX wrote: > I've seen includeme used in some examples of writing pyramid tests, but I'm > still not sure. If the idea is to allow tests to have a lot of the context > of the regular app, then shouldn't I instead move most of the lines from > main to includeme

Re: [pylons-discuss] Same mailer instance being returned regardless of which request is passed to get_mailer

2014-12-22 Thread Michael Merickel
The mailer is a utility that represents an external service. It is not different per-request just like how your smtp server is not different per email you send. Using .clear() is appropriate here. On Mon, Dec 22, 2014 at 2:04 PM, pyramidX wrote: > In a given unit test function I create 2 request

Re: [pylons-discuss] Reorganizing the Pylons organization

2014-12-26 Thread Michael Merickel
I'll go ahead and be that guy who says he doesn't like seeing his open source community move away from irc. Sure slack may work with irc but is there actually a problem with just using irc?? This is maybe the 2nd or 3rd pyramid discussion I'm seeing offloaded to slack and it bothers me. Back to t

Re: [pylons-discuss] Reorganizing the Pylons organization

2014-12-26 Thread Michael Merickel
Sorry I'll say more than "it bothers me". It's an invite-only system that seems counter to the principals of contributing to an open source project. Even with its irc support enabled. On Fri, Dec 26, 2014 at 12:40 PM, Michael Merickel wrote: > I'll go ahead and be

Re: [pylons-discuss] Re: What is the difference between View and Route predicates?

2015-01-29 Thread Michael Merickel
On Thu, Jan 29, 2015 at 9:55 AM, Jonathan Vanasco wrote: > They don't actually differ at all. There is really only one "Predicate" > object with a specified behavior. As the docs say "You can use the same > predicate factory as both a view predicate and as a route predicate." So > they're real

Re: [pylons-discuss] Re: What is the difference between View and Route predicates?

2015-01-29 Thread Michael Merickel
On Thu, Jan 29, 2015 at 1:57 PM, Jonathan Vanasco wrote: > The __call__ method of a predicate factory must accept a resource (context) > and a request, and must return True or False. It is the "meat" of the > predicate. > > You can use the same predicate factory as both a view predicate and as a >

[pylons-discuss] introducing pyramid_services 0.1.1

2015-02-17 Thread Michael Merickel
github.com/mmerickel/pyramid_services I hope you find it useful. - Michael Merickel -- 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 pyl

Re: [pylons-discuss] introducing pyramid_services 0.1.1

2015-02-17 Thread Michael Merickel
e of >> your gist. >> >> Bert >> >> > On Feb 17, 2015, at 01:34 , Michael Merickel wrote: >> > >> > Hey everyone, >> > >> > I've been using some patterns within Pyramid for a while to create >> > service layers in

Re: [pylons-discuss] introducing pyramid_services 0.1.1

2015-02-17 Thread Michael Merickel
On Tue, Feb 17, 2015 at 10:32 PM, Mike Orr wrote: > I like having a standard way to do this, and I haven't been entirely > satisfied with other ways to manage things like Redis connections and > login code, and making them request attributes. But if the objects > aren't going to change for the lif

Re: [pylons-discuss] introducing pyramid_services 0.1.1

2015-02-19 Thread Michael Merickel
On Thu, Feb 19, 2015 at 5:59 AM, Oliver Berger wrote: > What would be the difference except a more or less unified API to retrieve > the services? > May be I am missing the point My apps tend to have more factories than utilities, and they need to share things like database connections across

[pylons-discuss] Pyramid 1.5.3 released

2015-02-22 Thread Michael Merickel
Pyramid 1.5.3 has been released. This is a bugfix release, with a few backports from the 1.6 branch. Here's what happened since 1.5.2: 1.5.3 (2015-02-22) == - Work around an issue where ``pserve --reload`` would leave terminal echo disabled if it reloaded during a pdb session.

[pylons-discuss] Pyramid 1.5.4 released

2015-02-24 Thread Michael Merickel
Well that was short lived! Pyramid 1.5.4 has been released. This is a small release to correct a regression introduced in 1.5.3. Here's what happened since 1.5.3: 1.5.4 (2015-02-24) == - Fix regression where ``pserve --reload`` would not work when running as a daemon. Backpor

Re: [pylons-discuss] pyramid_tm, psycopg2, no sqlalchemy

2015-03-10 Thread Michael Merickel
I'm not aware of a psycopg2 data manager. However if you just use the sqlalchemy dbapi then you can hook the zope.sqlalchemy data manager up and use `zope.sqlalchemy.mark_changed(session)` api in conjunction with `session.execute()`. I think this gets you most of the way there without really using

Re: [pylons-discuss] authenticated_userid / unauthenticated_userid

2015-04-09 Thread Michael Merickel
I've never had the assumption that unauthenticated_userid would return the same thing as authenticated_userid. In my custom token-based policy I simply have the former return the token and the latter checks the database and converts it to a real user id. The definition of a user id in pyramid is c

Re: [pylons-discuss] Weird HTTPFound error after update, url full of commas. help?

2015-04-28 Thread Michael Merickel
On Tue, Apr 28, 2015 at 2:04 PM, Iain Duncan wrote: > g,o,d,e,l,t,a,s,t,a,g,i,n,g,.,x,o,r,n,o,t,.,c,o,m I don't have a good idea right now but my guess is possibly some code that is doing: >>> a 'godeltastaging.xornot.com' >>> ','.join(a) 'g,o,d,e,l,t,a,s,t,a,g,i,n,g,.,x,o,r,n,o,t,.,c,o,m' This

[pylons-discuss] Pyramid 1.4.9 and 1.5.7 released

2015-04-28 Thread Michael Merickel
Hey everyone, our security fixes for the JSONP renderer ended up being too restrictive. We ended up breaking Angular's callbacks by disallowing dots. This has been resolved in the latest releases. Enjoy, and please report any issues you find to the issue tracker at

Re: [pylons-discuss] How force DBSession to flush and commit SQLAlchemy expression language

2015-05-03 Thread Michael Merickel
On Sat, May 2, 2015 at 12:09 AM, wrote: > In my web app I sometimes use SQLAlchemy expression language rather than > ORM. But then DBSession is unaware of my commands. What is the proper way of > making DBSession flush and commit SQL in this use case? The SQLAlchemy session talks to the transact

Re: [pylons-discuss] Which Pyramid based "Development Environment"/Framework should I be considering?

2015-05-20 Thread Michael Merickel
If you are used to rolling your own then Pyramid is a great place to start. I would recommend starting from core Pyramid unless you find one of the more opinionated solutions fits your needs. On Wed, May 20, 2015 at 3:35 PM, Andreas Kaiser wrote: > On 18 May 2015, at 22:25, Randy Syring wrote: >

Re: [pylons-discuss] pyramid_mailer don't run with python 3.4.X

2015-05-21 Thread Michael Merickel
It's not necessary to repost the issue here on the mailing list. Thank you for the report. On Thu, May 21, 2015 at 3:35 PM, Mário Idival wrote: > Checkout: > https://github.com/Pylons/pyramid_mailer/issues/67 > > Mário Idival > Python Developer > > Twitter|Github|Skype : marioidival > Facebook:

[pylons-discuss] Pyramid 1.6a2 released

2015-06-30 Thread Michael Merickel
Hey everyone, we've ported a few bug fixes from the 1.5 series into this release and fixed one critical issue when using ``pyramid.renderers.render_view`` on 1.6. We've had very few complaints about any changes made in 1.6a1 so we should be able to accelerate the timeline on getting a final releas

Re: [pylons-discuss] Re: Render Jinja-template to string

2015-07-07 Thread Michael Merickel
Hmm, in theory it's supposed to fallback to the search path but try the asset spec first. If you could add a reproducible example to an issue I'd be happy to take a look. On Tue, Jul 7, 2015 at 2:18 PM, Martin Stein wrote: > Hi everybody, > > sorry, my last email was premature. I've gotten it to

Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-31 Thread Michael Merickel
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 completel

Re: [pylons-discuss] StopableWSGIServer is blocking

2015-10-07 Thread Michael Merickel
I think this is documented poorly but basically when you did server = StopableWSGIServer.create(...) the server is already running at that point. The run() method is not necessary when using create(). It is only necessary if you don't use the create() helper and directly instantiate a StopableWsgiS

Re: [pylons-discuss] how necessary is paste.deploy and/or an ini file?

2015-10-20 Thread Michael Merickel
On Tue, Oct 20, 2015 at 11:57 AM, Chris Withers wrote: > What's different between the app in the first snippet and the app in the > second snippet? > Well the second snippet has level of indirection between you and the final wsgi app. It may not be the one configured in the upper snippet but rat

Re: [pylons-discuss] Pyramid view_config's "accept" predicate and default (catch-all) view

2015-10-25 Thread Michael Merickel
Currently the accept= routing is scheduled for a redesign. It technically works but is nondeterministic when two content types of equal quality are defined. For example, your default view with no accept= will only occur on requests that do not accept */*, otherwise either text/plain or application/

Re: [pylons-discuss] When and why should config.begin() be called?

2015-11-09 Thread Michael Merickel
It's pretty rare that you need begin() during config-time of your app. It pushes threadlocals on the stack so that certain APIs like asset lookups and renderers can access your config. This is almost never necessary but you managed to find a case where it matters in using translation_dirs. The tim

[pylons-discuss] Pyramid 1.6b1 released

2015-11-15 Thread Michael Merickel
Hey everyone, we've just cut 1.6b1. There are a few important changes to note: - pserve --reload will no longer crash due to syntax errors in your code! Yay! - We are officially deprecating the daemon / supervision support in pserve. This includes --daemon, --pid-file and --monitor-restart among

[pylons-discuss] Re: Pyramid 1.6b1 released

2015-11-15 Thread Michael Merickel
1.6b2 is released as well. I'm not doing to do a separate thread for this, but there was a minor feature that was intended to be released that went missing, so 1.6b2 was born. Enjoy! On Sun, Nov 15, 2015 at 8:54 PM, Michael Merickel wrote: > Hey everyone, we've just cut 1.6b1. Th

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

2015-11-19 Thread Michael Merickel
On Thu, Nov 19, 2015 at 12:43 PM, Jonathan Vanasco wrote: > On Sunday, November 15, 2015 at 9:54:49 PM UTC-5, Michael Merickel wrote: >> >> - pserve --reload will no longer crash due to syntax errors in your code! >> Yay! >> > > This is actually amazing. Thank

Re: [pylons-discuss] How different is pyramid too pylons?

2015-12-16 Thread Michael Merickel
Code organization is similar which I think is the most important point for learning and several libraries are common (like webob, sqlalchemy and beaker) but the actual APIs are different for routing and most other things inside pyramid. It would be a mistake to start any new projects in Pylons as

[pylons-discuss] Pyramid 1.6b3 released

2015-12-17 Thread Michael Merickel
Hey everyone, we've just cut 1.6b3. I think we're finally done messing with the cache buster API (which is the primary change in this release). Please have a look at it if it's something you're interested in - we love feedback. Otherwise expect a 1.6 final sometime next week! Enjoy, and please rep

Re: [pylons-discuss] Re: Pyramid 1.6b3 released

2015-12-18 Thread Michael Merickel
Thanks Jonathan, in fact I probably should have linked to the changelog which is better than trolling the commit history. https://github.com/Pylons/pyramid/blob/1.6-branch/CHANGES.txt - Michael On Fri, Dec 18, 2015 at 3:15 PM, Jonathan Vanasco wrote: > For anyone else interested in exactly wha

[pylons-discuss] Pyramid 1.6 final released

2016-01-02 Thread Michael Merickel
Folks, it's been a long time in the making but 1.6 is officially released! Some highlights include: - Python 3.5 compatibility. - ``pserve --reload`` no longer crashes on syntax errors. - ``Configurator`` actions may now call each other making it much simpler to define extensions in your own app

Re: [pylons-discuss] Problems with debug toolbar when running via uwsgi

2016-01-21 Thread Michael Merickel
The debugtoolbar does not work in a multiprocess environment. Period. It explicitly uses shared state in memory in order to show you the history of requests. If you set "processes = 1" that may help but I am not familiar with uwsgi configuration to say for sure. This issue[1] was created to display

[pylons-discuss] Pyramid 1.6.1 bugfix released

2016-02-02 Thread Michael Merickel
Hey folks. There have been very few reports of problems with the 1.6 series so far but there was a regression with ``pyramid.session.check_csrf_token`` failing when checking header values that I wanted to get out there. The full changelog is available here: http://docs.pylonsproject.org/projects/

Re: [pylons-discuss] Re: dynamic domain cookie with authtkt?

2016-02-20 Thread Michael Merickel
A Host header is required by HTTP 1.1 and everything in pyramid (and most WSGI apps) is built to be relative to this header. You will need to come up with a solution to set this header such as setting it yourself in middleware or a tween. Anything really. But this is out of scope for us to fix in t

Re: [pylons-discuss] pyramid.traversal.resource_path(obj) != request.resource_path(obj)

2016-02-20 Thread Michael Merickel
I don't have a very good answer for you but it does appear that each of the respective methods is explicitly documented to behave in the way that it behaves. Since that's defined behavior you can likely depend on that and add a trailing / to the output of p.traversal.resource_path(..). On Sat, Feb

Re: [pylons-discuss] Re: Traversal over a filesystem

2016-02-29 Thread Michael Merickel
One of the original Pyramid demo projects is traversal over a filesystem. https://github.com/Pylons/virginia On Tue, Mar 1, 2016 at 12:08 AM, Mike Orr wrote: > On Sun, Aug 23, 2015 at 7:24 AM, Mike Orr wrote: > > Has anyone used traversal over a filesystem for non-static content? > > I'm think

Re: [pylons-discuss] Can I subscribe to an "Exception" event?

2016-03-09 Thread Michael Merickel
There is no event emitted by Pyramid upon exception right now. You could emit it yourself by adding a tween UNDER the excview tween that would catch exceptions, notify subscribers, and then re-raise the exception to be later handled by the excview. On Thu, Mar 10, 2016 at 1:27 AM, Torsten Irländer

Re: [pylons-discuss] Tuning the number of waitress threads for production

2016-03-11 Thread Michael Merickel
Waitress is multithreaded (it does not fork) with the main thread using asyncore to accept new sockets. A new socket is accepted and dispatched to a free thread in the threadpool. The configured WSGI app is shared between all threads. Since each request is managed in its own thread it is synchronou

Re: [pylons-discuss] what is the correct way to serve a non-file response with binary data?

2016-03-23 Thread Michael Merickel
from pyramid.response import Response response = Response() response.content_type = 'application/octet-stream' # or some other mime type response.body = b'foo' return response On Wed, Mar 23, 2016 at 6:18 PM, Jonathan Vanasco wrote: > I have a small parcel of information that needs to be sent

Re: [pylons-discuss] What is the correct way to add an object to a request instance?

2016-03-24 Thread Michael Merickel
I'm not sure why you would even consider the second option if the first works. The set_property functionality is for lazily computing properties to avoid the cost. If you already have objInstance then you aren't being lazy anymore. On Thu, Mar 24, 2016 at 3:26 PM, Jonathan Vanasco wrote: > I nee

Re: [pylons-discuss] pyramid_rpc, decorate xmlrpc method?

2016-04-01 Thread Michael Merickel
Pyramid's approach to decorators is that you may use the decorator= argument. The xmlrpc_method forwards arguments to config.add_view so everything that works with normal pyramid views will work with your methods. def my_decorator(wrapped): def wrapper(context, request): # do stuff

Re: [pylons-discuss] disable logging with `prequest`?

2016-04-11 Thread Michael Merickel
prequest --help says: The variable "environ['paste.command_request']" will be set to "True" in the request's WSGI environment, so your application can distinguish these calls from normal requests. So you can do something specific for prequest, or you can use a different ini. - Michae

[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 look > really act

[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 disabl

[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. - E

[pylons-discuss] Pyramid 1.7b1 released

2016-04-25 Thread Michael Merickel
Pyramid 1.7b1 has been released. - This release primarily is to signify the beta period. We've seen several larger projects (including warehouse and websauna) using the alpha with success. - There was a bug in the packaging of 1.7a1 and 1.7b2 causing some files from the old alchemy scaffold to cr

[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 ``config.ad

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 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. >> > > We mea

[pylons-discuss] Pyramid 1.7b3 released

2016-05-09 Thread Michael Merickel
Pyramid 1.7b3 has been released. This is VERY likely the last beta release. - Fixed an inconsistency between the docs and the behavior of ``request.invoke_exception_view``. - The scaffolds will now render a pytest.ini which will auto-discover the tests when running ``py.test``. - A bunch of brok

[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 ex

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 in Pyramid projects. >

[pylons-discuss] Pyramid 1.7 released

2016-05-19 Thread Michael Merickel
Pyramid 1.7 has been released! There are minimal changes from 1.7b4 which I will not enumerate here. Special thanks to Steve Piercy for the significant amount of time and detail he has put into curating the documentation for this release, including the conversion from easy_install to pip and his

Re: [pylons-discuss] pserve: "No such file or directory --reload" (or any other option flag)

2016-06-23 Thread Michael Merickel
Something has likely become corrupt in your virtualenv. I'd try creating a new one. This is not a but with the pserve code itself but rather your environment. On Thu, Jun 23, 2016 at 4:02 PM, Chris Shenton wrote: > I've been using "pserve --reload myenv.ini" forever and recently the flags > stop

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, s

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 tw

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] 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 a requirements.txt and

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 > directory of the proj

[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 t

[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 as

[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 Thanks!

[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 the

[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 pyramid_tm=

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 wrote: > does anyone hav

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
The default exceptions raised when the framework determines notfound and forbidden errors are reliant on the request's Accept headers to determine which response to see. If you're seeing html it's because the request favored it over application/json. You can override these exception views and then

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 > content-typ

[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 the

[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] 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 http://docs.pylonsproject.org/projects/pyramid/en/1.

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. http://docs.pylonsproject.org/projects/pyramid/en/1.8-branch/whatsnew-1.8 .html http

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 fa

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 t

[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: http://docs.pylonsproject.org/projects/pyramid/en/1.8-

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 namespace packages are kludg

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 sc

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 Developers, > I would like

[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 m

[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

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

[pylons-discuss] Re: Pylons Project GSoC 2017

2017-02-28 Thread Michael Merickel
us and we can probably figure something out. - Michael On Thu, Feb 9, 2017 at 10:16 AM, Michael Merickel 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 t

[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 cha

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 SQLAlchemy starts a new transact

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 but I'll reiterate that i

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 wil

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. To unsubscribe from this

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

2017-03-11 Thread Michael Merickel
t;>> 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 so tryin

[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 while.

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_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 r

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 non-client-side sessions. > * ther

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. https://pypi.python.org/pyp

[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 fi

[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 advise people to install

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 supervisor

<    1   2   3   4   5   6   7   >