This is a very simplified version of my approach:
I typically handle this by injecting a `cdn` variable into the default
rendering environment, and then just having the templates reference
href="${cdn}/path/to/file"
I specify the `cdn` var in the `.ini` file for the application. on startup
I've done a handful of side-by-side migrations or deployments.
I think you already identified the generally best approach IMHO:
> Conceptually the simplest would be to have a auth cookie that is
valid in both, it could be set to only be created in one and honoured in
the other.
However I
Does anyone have tips/advice for migrating away from Formencode?
I have a lot of apps using Formencode and will likely need to move off it.
It's no longer maintained, and needs to a patch/fork to run under Python3.
That's been fine for internal apps, but it's a pain for open sourced
efforts.
too fragile so I try to keep all those apps running under
Python2..
On Friday, October 2, 2020 at 3:40:22 PM UTC-4 Steve Piercy wrote:
> On 10/2/20 10:06 AM, 'Jonathan Vanasco' via pylons-discuss wrote:
> > Does anyone have tips/advice for migrating away from Formencode?
nder schema examples for each Deform widget that you want.
>> If you don't see something, ask!
>>
>> --steve
>>
>>
>> On 10/2/20 1:00 PM, 'Jonathan Vanasco' via pylons-discuss wrote:
>> > Thanks, Stev!
>> >
>> > Deform i
in my use case. Now that Formencode 2 is out
> I'll upgrade to it.
>
> On Mon, Oct 5, 2020 at 7:34 AM 'Jonathan Vanasco' via pylons-discuss
> wrote:
> >
> > Talk about timing. Several hours after I posted this, Formencode merged
> the Python3 fix(es)
I've looked at the code and am pretty sure the answer is no, but a bunch of
subclasses are used here, so I think it's best to ask -- Will
render_to_response ever return something that is not
`pyramid.response.Response`?
I have a small library that will act on the output of render_to_respons
t implementing pyramid.interfaces.IResponse (the
> expected return value from the app's configured IResponseFactory). This is,
> of course, slightly more general than pyramid.response.Response.
>
> - Michael
>
> On Oct 12, 2020, at 13:48, 'Jonathan Vanasco' via pylons
I don't use Google's platform, but from what I can tell:
1. Their platform adds in the header "X_CLOUD_TRACE_CONTEXT"
2. There are middleware tools for aggregating logs based on that
3. I don't know if the software you linked is using the middleware, but the
popular libraries seem to be:
* https
I don't know about "correct", but I use `add_request_method` to attach a
custom object(s) with `reify=True,` and then store all the information in
those objects. IIRC, the narrative documentation and tutorials use it for
similar purposes.
https://docs.pylonsproject.org/projects/pyramid/en/late
Have you considered using Celery for this? I started offloading everything
related to subprocesses and message queues to it a while back, and have
been much happier.
On Monday, January 4, 2021 at 11:20:46 AM UTC-5 tfl...@gmail.com wrote:
> Hi,
>
> I need to create custom sub-processes from my
be able to get
> access to main Pyramid's registry from my sub-process and it's threads, and
> I don't really understand why I get a pointer to
> ZCA global registry... :(
>
> Best regards,
> Thierry
> --
> https://www.ulthar.net -- http://pyams.readthedocs
(probably more reliable!) of my own developments...
>>
>> Best regards,
>> Thierry
>> --
>> https://www.ulthar.net -- http://pyams.readthedocs.io
>>
>> Le mar. 5 janv. 2021 à 22:18, 'Jonathan Vanasco' via pylons-discuss <
>> pylons-...@goog
I typically handle this on nginx which sites in front of Pyramid. if you
wanted to do everything in python, you could probably use WSGI middleware
to route to a separate maintenance application or html file.
On Thursday, January 7, 2021 at 10:09:34 AM UTC-5 C J wrote:
> Hi everybody,
>
> I am
i should add, the pattern for doing this in nginx is often called a flag or
semaphore
i found this article that goes through a
how-to
https://blog.devcloud.hosting/configuring-nginx-for-quickly-switching-to-maintenance-mode-e4136cf497f3
basically, you just touch/remove a specific file to chan
FWIW, Based on the stacktrace, I do not think this is the cause -- but it
could be. There have been a few related bugs in setuptools and pip
regarding the version parser and tag_build directives; the errors I've seen
were not like this - but I saw 3 completely different errors from these
over t
> I'd just say though that if you need the request and don't have it,
> it's often an indication that the program's structure is wrong.
I authored this change, and you are absolutely correct. This technique is
not ideal, but it is designed to stop several anti-patterns that happen
with great fr
For those that need 2.0 support with pyramid_session_redis, I have pushed a
Pyramid2 compatible branch of pyramid_session_redis to
https://github.com/jvanasco/pyramid_session_redis/tree/1.6-branch-concept_a
This branch is NOT likely to mature to an actual release, and is basically
offered as a
I had a small Pyramid project which has grown into a much larger one.
Many Views service multiple Routes (multiple calls to `@view_config()`),
typically offering a default HTML version on a "bare" url, and a JSON
version with a ".json" suffix to the url.
Documenting these routes has become incr
t; it is on-demand only).
>
> https://pyramid-realworld.herokuapp.com/api
>
> --steve
>
>
> On 3/12/21 1:36 PM, 'Jonathan Vanasco' via pylons-discuss wrote:
> > I had a small Pyramid project which has grown into a much larger one.
> >
> > Many Views serv
I've run into this same problem a few times in unittest. I'm hoping someone
else has a better solution.
1. The test harness uses webtest.TestApp to mount the Pyramid application
2. A route has a payload with an object that can not be rendered into json
3. The traceback looks like the item below.
pyramid_session_redis 1.6.0 is now released on Github and PyPi.
Notable changes:
* Pyramid2 is now supported.
* Pyramid1.x and Python2 are still fully supported.
* The Session object has two new methods:
* Session.adjust_cookie_expires
* Session.adjust_cookie_max_age
* These methods
Extending and hoping to clarify Steve's example above, Pyramid users
typically leverage the "predicates" to handle this mapping. by using the
`request_method` predicate to map "GET" to "view", "POST" to "create", etc.
On Monday, May 10, 2021 at 4:27:09 PM UTC-4 grc...@gmail.com wrote:
>
> excell
They're not the same at all.
The difference is on purpose.
Janzert is correct, though his description may not necessarily be clear.
The following might make more sense:
The two functions do the following:
pyramid.csrf.get_csrf_token(request)
discern active ICSRFStoragePolicy
invoke {
Are there any plans to replace Freenode, in light of the recent
developments?
See:
https://boingboing.net/2021/05/19/freenode-irc-staff-quit-after-new-owner-seizes-control.html
https://libera.chat/
--
You received this message because you are subscribed to the Google Groups
"pylons-d
uses which is behind such stalwarts as Debian, Libreoffice (in the U.S.)
> and PostgreSQL.Org
> >
> > On Wed, May 19, 2021 at 7:24 AM 'Jonathan Vanasco' via pylons-discuss <
> pylons-...@googlegroups.com <mailto:pylons-...@googlegroups.com>> wrote:
One of my CI tests deals with an edge case, in which a HTTPMovedPermanently
is raised in deeply nested code. This almost never gets raised in
Production - rules on the loadbalancer/gateway typically catch it.
With the debugtoolbar off, Pyramid serves the redirect. With the
debugtoolbar enabled
I *temporarily* solved this by modifying an existing tween. The relevant
code looks like this:
def my__tween(request):
_redirect = None
try:
response = handler(request)
except HTTPException as exc:
_redirect = exc
if _redirect:
> It looks like the `future` flag on Engine and the `future` flag on
Session are two separate things. So you need to add `future=True` to
either sessionmaker or the Session constructor.
Confirming this. There is also a `future` on `Connection` objects, but
that is inherited from `Engine`. Se
On Monday, December 13, 2021 at 9:14:30 PM UTC-5 the...@luhn.com wrote:
> 1) pserve isn’t really comparable with gunicorn, its just a way to launch
> a server, such as gunicorn or waitress. You’re probably using waitress,
> that’s what the Pyramid docs use.
>
> I personally use gunicorn, but m
100% with you. That's why I wrote it isn't "really" possible. It is
possible, just under limited conditions. IIRC, one could also use the COMET
chunking technique to faciliate this - though that would likely cause some
client side issues. If you're doing a direct browser-to-server connection,
We run Pyramid via uwsgi, behind an OpenResty server (Nginx fork with
embedded lua interpreter).
IMHO the "best" stack is somewhat dependent on your application. We have a
large application and the forking model of uwsgi - combined with many of
its management hooks - lets us aggressively lev
I assume this message is automated by a release script, and that is out of
date.
The changes and latest aren't rendered onto those docs, and the anchors
don't exist.
The changes do appear here:
https://github.com/Pylons/pyramid_tm/blob/master/CHANGES.rst
On Sunday, March 13, 2022 at 4:01:18
m/en/latest/changes.html
>
> --steve
>
>
> On 3/16/22 10:10 AM, 'Jonathan Vanasco' via pylons-discuss wrote:
> > I assume this message is automated by a release script, and that is out
> of date.
> >
> > The changes and latest aren't rendered onto thos
I doubt anyone here may have experienced this, but I've run out of
resources to explore on this...
We use Fabric (fabfile.org) to automate a lot of things. It is great.
I built a new routine in it this week, and I can't get it to clean up
properly. The routine simply spins up an admin version
virtualenv wrapper around a console
> script which this should skip.
>
>
>
> - Michael
>
> On Jun 8, 2022, at 15:31, 'Jonathan Vanasco' via pylons-discuss <
> pylons-...@googlegroups.com> wrote:
>
> I doubt anyone here may have experienced this, but
^ ditto
On Tuesday, June 28, 2022 at 6:28:23 PM UTC-4 the...@luhn.com wrote:
> Easiest way is to not do it :) I try to offload downloads/uploads to a
> service like S3. Let somebody else do the heavy lifting. If
> authentication is needed, I’ll generate a presigned URL in Pyramid and
> redi
On Tuesday, August 16, 2022 at 11:45:24 AM UTC-4 Mike Orr wrote:
> It is rolling back in some of my testing when there's no
> insert/delete/update, but I want to make sure it always does, just in
> case something somehow modifies the database when we didn't intend to.
> It's not that big a deal but
Have you tried using statsd ? (https://github.com/statsd/statsd)
See
* https://www.etsy.com/codeascraft/measure-anything-measure-everything/
*
https://thenewstack.io/collecting-metrics-using-statsd-a-standard-for-real-time-monitoring/
Typically you log each request start and the stop reason (s
This looks interesting. I'll try to test it on uwsgi and contribute a PR if
it works. If anyone can beat me to it though...
On Wednesday, August 24, 2022 at 4:44:09 AM UTC-4 mi...@redinnovation.com
wrote:
> Hi Thierry,
>
>
>> That seems to be a nice project!
>> I would like to provide an integr
40 matches
Mail list logo