I just use "PYTHONWARNINGS=default", afaik that's all I need to do right?
It shows me all the Pyramid and waitress warnings.
On 28. Nov 2022 at 19:53:27, Jonathan Vanasco wrote:
> On Sunday, November 27, 2022 at 1:23:21 PM UTC-5 zsol...@gmail.com wrote:
>
>> Great to know! About the warnings,
Great to know! About the warnings, I'm on 2.0 and it works, so either some
of those RemovedIn20Warning are not removed or none of them are left.
I mean I rewrote my queries to 2.0 style, but I've read that 1.x style
queries will continue to work, they are just removed from the documentation
now.
I think I figured this one out, I can pass the bytes into params= and
it'll work. Strange naming though.
On 24. Jun 2021 at 20:56:50, Zsolt Ero wrote:
> Hi,
>
> How can I upload a file in the body in webtest.post? requests allows me
> to do this in data=, curl in --data-binar
Hi,
How can I upload a file in the body in webtest.post? requests allows me to
do this in data=, curl in --data-binary.
Webob reads this in body_file_seekable. How can I do this in webtest.post?
Regards,
Zsolt
--
You received this message because you are subscribed to the Google Groups
Hi,
I have my webtest based testing set up like the following.
@pytest.fixture(scope="session")
def app():
testing_config = {
'sqlalchemy.url': 'postgresql+psycopg2://x@/x',
'redis.sessions.secret': 'x', # random string
'redis.sessions.db': 1,
Hi Theron,
Thanks for your reply. It looks indeed simpler. How much more minimal can I
make it? I definitely want to "circumvent" the whole security system, I'm
perfectly happy with using my new require_admin=True like options.
I just want CSRF to work and it seems to be dependent on
Just for reference I'd like to post what worked for me. Thanks for the
detailed help.
Finally I've settled on the following values:
```
redis.sessions.secret = xxx
redis.sessions.cookie_max_age = 31536 # 10 years, basically forever
redis.sessions.timeout = 1800
redis.sessions.cookie_secure
I had a few questions in
https://github.com/Pylons/waitress/issues/253, which were not really
an issue and I'd like to ask them here instead.
My question mostly is that if I'm using modules which are
non-multithread compatible in pserve / waitress, how can I make sure
they work correctly?
There is a bug in WTForms 2.2+ which related to how WebOb handle
request.POST in GET requests.
https://github.com/wtforms/wtforms/issues/460
We are trying to find a WebOb specific solution with the maintainer, to
handle the NoVars case. I just wanted to ask, what approach would you
recommend
Thanks for the answers.
I've been using gunicorn with sync workers and it seems clear to me.
If I understand correctly, up-till-some-point, everything in the
script is shared across the processes, and these receive identical ids
in Python. Everything which happens at import time is definitely in
Thanks a lot for all the answers. So far I've only implemented select
queries, using dbsession.execute. I'll read about the "changed" state
handling.
About the additional options: pool_pre_ping seems to work well and
doesn't seem to have any side effects.
pool_reset_on_return on the other hand
I'm trying to set up an API which would use SQLAlchemy Core (not ORM) +
PostgreSQL. The server is a Google managed PostgreSQL instance, on external
IP.
I have a couple of questions. Since I needed to manually add SSL
certificates as connect_args to create_engine + some additional arguments,
rry
>
>
> Le jeu. 10 janv. 2019 à 13:37, Zsolt Ero a écrit :
>>
>> Actually, it doesn't result in async-like behaviour, the client is
>> still waiting for the function inside the commit hook. I guess I don't
>> understand the concept then.
>>
>> On
Actually, it doesn't result in async-like behaviour, the client is
still waiting for the function inside the commit hook. I guess I don't
understand the concept then.
On Thu, 10 Jan 2019 at 13:15, Zsolt Ero wrote:
>
> I'm just now implementing this. Are you saying that basically, by
I'm just now implementing this. Are you saying that basically, by using
addAfterCommitHook, I can replace put relatively fast (say, <10 seconds),
functions into async-like behaviour, without requiring any external queue
service?
old:
# send email was an async function, via a decorator (using
On a fairly classic Pyramid app (sync, gunicorn, SQLAlchemy / Postgresql,
like the starter template), I am storing analytics-like events in a table
for some of my views.
Like this skeleton:
@view_config(route_name='test', request_method='POST', renderer='json')
def test(request):
# body of
for this?
Zsolt
On 17 April 2018 at 15:10, Zsolt Ero <zsolt@gmail.com> wrote:
> I've realised the following:
> 1. If I don't specify Content-Type, curl defaults to x-www-form-urlencoded
> 2. What I thought is the binary file's contents as a string is
> actually not working r
I've realised the following:
1. If I don't specify Content-Type, curl defaults to x-www-form-urlencoded
2. What I thought is the binary file's contents as a string is
actually not working reliably. On an XML upload of a single file I get
thousands of items and request.POST.items() looks like:
['
Hi,
I'm trying to implement an API to a website which didn't have an API
yet. It's purpose will be to allow file uploads from 3rd party native
apps.
I'd like to implement the API like Dropbox v2 API, just as a good
reference for API design.
It's upload endpoint has the following specs:
use the explicit
> manager".
>
> The only time you really need to think about transaction stuff is when
> pyramid_tm is not active which is basically at config-time and in console
> scripts.
>
> - Michael
>
> On Mon, Apr 2, 2018 at 2:54 PM, Zsolt Ero <zsolt@gmail.c
nsaction.
>
> [1]
> https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/#custom-transaction-managers
>
> On Mon, Apr 2, 2018 at 2:21 PM, Zsolt Ero <zsolt@gmail.com> wrote:
>>
>> Michael, I've updated the code to your recommendation.
>>
>>
ession and re-attach/merge them into any session where you
> use them.. ORM objects are only valid on the dbsession they were loaded
> from.
>
> - Michael
>
>
> On Mon, Apr 2, 2018 at 11:59 AM, Zsolt Ero <zsolt@gmail.com> wrote:
>>
>> OK, I agree wit
OK, I agree with that. Still, storing config values in the database is
a common pattern for medium to large web apps, so it at least makes
sense to have some kind of resource about how to do it. I hope that if
nothing else at least this thread will be useful for someone in the future.
--
You
Wouldn't the second / "foolproof" way described here be a good choice
for the default Pyramid implementation? Just as a safety measure.
http://docs.sqlalchemy.org/en/latest/core/pooling.html#using-connection-pools-with-multiprocessing
On 2 April 2018 at 18:32, Jonathan Vanasco
connection().engine.dispose()
del dbsession
Zsolt
On 2 April 2018 at 17:54, Jonathan Vanasco <jvana...@gmail.com> wrote:
> On Sunday, April 1, 2018 at 8:18:39 PM UTC-4, Zsolt Ero wrote:
>>
>> Hi Jonathan,
>>
>> I'm not 100% sure I understand when are you
Hi Jonathan,
I'm not 100% sure I understand when are you talking about the
"standard" Pyramid way of the cookiecutter template's get_tm_session's
implementation and when are you talking about my special addition of
using the db to set up the app.
I don't know how and when is a gunicorn process
how can I benefit from including
it?
Zsolt
On 1 April 2018 at 09:53, Zsolt Ero <zsolt@gmail.com> wrote:
> Hi,
>
> I'm running Pyramid + SQLAlchemy + PostgreSQL in a "classic" sync stack
> (like the cookiecutter one, pyramid_tm, etc.), simple gunicorn default
> (pr
Hi,
I'm running Pyramid + SQLAlchemy + PostgreSQL in a "classic" sync stack
(like the cookiecutter one, pyramid_tm, etc.), simple gunicorn default
(process) workers.
I have a few problems (via pg_top or ps aux):
1. I'm getting about 2x the number of PostgreSQL connections as the number
of
2017 16:34:36 UTC+2, Mikko Ohtamaa wrote:
>
> Hi,
>
>
> On 31 August 2017 at 17:19, Zsolt Ero <zsol...@gmail.com >
> wrote:
>
>> After reading zzzeek's great blog post:
>> http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/
>
After reading zzzeek's great blog
post: http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/
and SO answer: https://stackoverflow.com/a/16503103/518169 I would like to
use gevent / sqlalchemy / psycopg2 / gunicorn in a new application.
All I've found for Pyramid is the old
Yes, it works perfectly. The only interesting bit is integrating
create-react-app's watch mode with Pyramid, or any classic backend for that
matter, if you use server side routing.
Not very complicated, but to set up watch mode, you need to:
1. Eject the app
2. Make it look for a different port
I was thinking of that as well, but it implies using the same ini file,
which I'd like to keep separate.
On 2017. Jan 20., Fri at 17:56, Jonathan Vanasco wrote:
> I think the command you want in uwsgi is `ini-paste-logged` instead of
> `paste`
>
>
>
ons.html?highlight=paste-logger#paste-logger
>
> uWSGI doesn’t automatically pick up your fileConfig logging otherwise.
>
> (Basically unless you explicitly call fileConfig for your .ini right now
> uWSGI doesn’t do anything with your logging handlers/information)
>
>
> On
ster ini file, how are you starting uWSGI?
>
> Bert
>
> On Jan 19, 2017, at 08:08, Zsolt Ero <zsolt@gmail.com> wrote:
>
> I believe this is uWSGI specific, and might even be a bug in uWSGI, but
> since many people are using uWSGI with Pyramid here, I'd be interested to
>
I believe this is uWSGI specific, and might even be a bug in uWSGI, but
since many people are using uWSGI with Pyramid here, I'd be interested to
know how did you solve it.
I've migrated a project from Gunicorn to uWSGI. My problem is that my
previously set-up file-based logging is all
rom Budapest is the
van sharing service
http://GoOpti.com
. Been using them for years.
* there is a discussion on the sprint’s mailinglist about sharing an AirBNB
place:
https://groups.google.com/forum/#!topic/dragonsprint/4Dew-8y6qMk
Cheers,
z.
On 10 Nov 2016, at 23:53, Zsolt Ero <
mailto:zsol
Thanks a lot! I'm thinking about it, since I'm quite close (in Budapest).
On Thu, 10 Nov 2016 at 23:48 Mikko Ohtamaa
<
mailto:Mikko Ohtamaa
> wrote:
a, pre, code, a:link, body { word-wrap: break-word !important; }
This might or might not work, but looks complicated
Thanks. So this is how my site is setup:
I have a RootFactory:
class RootFactory(object):
__acl__ = [
(Allow, Authenticated, 'user'),
(Allow, 'g:admin', 'admin'),
(Allow, 'g:superadmin', 'ALL_PERMISSIONS'),
]
def __init__(self, request):
pass
used
Hi, I'd like to do the simplest possible thing in Pyramid / URL Dispatch,
yet it seems almost impossibly hard to do it.
So it's the super common case of having a menu, and I'd only like to insert
menu items which are available for the current user.
I'm looking for a function to fit in this
Thanks, that's a great howto, unfortunately, I'd need to compile nginx
from sources to get that module.
On 29 April 2016 at 03:03, Jonathan Vanasco wrote:
> You can do this in nginx.
>
> Cloudflare publishes a list of trusted ips; the nginx set_real_ip module
> will only
X-Forwarded-For
> with the value of Cf-Connecting-Ip.
>
> Bert
>
> > On Apr 23, 2016, at 17:09, Zsolt Ero <zsol...@gmail.com >
> wrote:
> >
> > I got a weird bug, in which request.client_addr was reported as
> 192.168.76.75:52411, which broke a function which expected i
I got a weird bug, in which request.client_addr was reported as
192.168.76.75:52411, which broke a function which expected it to be a
standard IP address. In the documentation I've read that this could be
anything, so I guess this isn't a surprise.
I am using CloudFlare -> nginx -> gunicorn ->
42 matches
Mail list logo