Re: [pylons-discuss] webob SignedSerializer questions

2023-06-12 Thread Bert JW Regeer
> On Jun 12, 2023, at 12:42, Jonathan Vanasco wrote: > > I've been updating my session library to utilize typing/mypy and this > implementation detail surfaced between mypy integration and some new tests. > > I hope someone can enlighten me on this and some best testing practices... > > Webo

Re: [pylons-discuss] Hypatia - drop Python 2, GitHub Actions?

2022-12-19 Thread Bert JW Regeer
someone is paying you a lot of money. Bert JW Regeer > On Dec 17, 2022, at 19:33, Peter Wilkinson wrote: > > Hi, > > I’ve been a user of Hypatia for a fair while now and have an additional index > type I’m just cleaning up at the moment to propose in a pull request - it’s a >

Re: [pylons-discuss] nice error for missing __init__.py

2022-11-27 Thread Bert JW Regeer
The stack trace you just posted is related to Jinja2 and attempts to use pkg_resources (in fact it is failing inside pkg_resources) not config.scan()… As for the venusian issue (and related pkg_resources issues) of not being able to scan folders without __init__.py see https://github.com/Pylons

Re: [pylons-discuss] Pyramid Response with File-like .write() interface

2022-08-09 Thread Bert JW Regeer
Some WSGI servers pass you the raw file descriptor as wsgi.input, but this is not guaranteed (wsgiref does for instance). Instead you should return an iterator that can be read incrementally so that your WSGI server can chunk responses. > On Aug 9, 2022, at 10:38, Mikko Ohtamaa wrote: > > H

Re: [pylons-discuss] Subscribing to connection lost / failed transaction event?

2022-03-08 Thread Bert JW Regeer
not something that comes for free, and requires that you use waitress, and it requires that you set the `channel_request_lookhead` flag, and it requires that you know your clients are directly connected. Caveat emptor. Thanks, Bert JW Regeer > On Mar 7, 2022, at 13:05, Jonathan Vanasco

Re: [pylons-discuss] Waitress v2.1.0 released

2022-03-05 Thread Bert JW Regeer
Hey all, I’ve released this as 2.1.0 now, No changes since the beta version! https://pypi.org/project/waitress/2.1.0/ Bert JW Regeer > On Feb 9, 2022, at 15:37, Steve Piercy wrote: > > Howdy, > > Waitress v2.1.0b0 has been released. > > For a list of changes in this

Re: [pylons-discuss] Subscribing to connection lost / failed transaction event?

2022-02-17 Thread Bert JW Regeer
No, this is not possible *. * Except under some very narrow circumstances, but none that are easy to use or directly supported in Pyramid > On Feb 17, 2022, at 13:12, Andrew Free wrote: > > Is there a way to subscribe to any events of a dropped/lost connection? > > For example, if the user cl

Re: [pylons-discuss] Programmatically creating and closing Waitress server: OSError: [Errno 9] Bad file descriptor

2022-01-24 Thread Bert JW Regeer
It’s using waitress under the hood, it’s not single threaded. > On Jan 24, 2022, at 09:51, Mikko Ohtamaa wrote: > > Hi Michael, > > > Have you looked at the StopableWSGIServer in webtest? I wonder if it can help > debug what you've been seeing. > > https://docs.pylonsproject.org/projects/web

Re: [pylons-discuss] AttributeError: module 'h.cli.commands' has no attribute 'authclient'

2021-12-15 Thread Bert JW Regeer
https://github.com/hypothesis/h <https://github.com/hypothesis/h>, they do have a detailed document on how to run h in your own development environment: https://h.readthedocs.io/en/latest/developing/install/ <https://h.readthedocs.io/en/latest/developing/install/> Thanks, Bert JW Regeer

Re: [pylons-discuss] Replacing Freenode?

2021-06-17 Thread Bert JW Regeer
Freenode imploded on itself. They dropped all registrations and all channels. It’s a free for all. As of right now I am not on IRC anymore, nor have I been in a long time. I can’t speak for others, but looking at the logs I saved from before I destroyed the VM that was running my bouncer, the I

Re: [pylons-discuss] Dependency injection in pyramid views

2021-03-23 Thread Bert JW Regeer
Not off-topic at all! Welcome and thanks for contributing to the ecosystem! > On Mar 23, 2021, at 17:41, Nick Beeuwsaert wrote: > > > Hi all, > > I just published my first package to PyPI-- its a viewmapper to inject > dependencies into views. > I have it published as a prerelease since I'd

[pylons-discuss] Waitress 2.0.0 Released

2021-03-07 Thread Bert JW Regeer
connections. This situation was previously difficult to diagnose. See https://github.com/Pylons/waitress/pull/322 Found a bug? Please direct your closest browser over to https://github.com/Pylons/waitress/issues Thanks, Bert JW Regeer -- You received this message because you are subscribed

[pylons-discuss] Waitress 2.0.0 beta is out

2020-11-26 Thread Bert JW Regeer
clients removing support for it). I need people to test this version before I release it so we can try to catch any potential regressions. It’s available from PyPi: https://pypi.org/project/waitress/2.0.0b0/ As always, please file issues https://github.com/Pylons/waitress/issues Thank you, Bert JW

Re: [pylons-discuss] upgraded to 1.4.2 and requests got stuck (load 1.0)

2020-11-08 Thread Bert JW Regeer
--connection-limit=2000 --threads=8 --cleanup-interval=15 > --channel-timeout=60 --asyncore-use-poll run:app. > > On Wednesday, February 5, 2020 at 2:05:13 PM UTC-5 pe...@formsort.com > <http://formsort.com/> wrote: > Yeah, he sits right next to me :) > > > On Monday,

Re: [pylons-discuss] Issues migrating dynamic CSV to Python3

2020-10-19 Thread Bert JW Regeer
y on the response, which does NOT go through that same mechanism and instead assumes that the file is a file in binary mode. > On Oct 19, 2020, at 10:23, Mike Orr wrote: > > On Sun, Oct 18, 2020 at 1:22 PM Bert JW Regeer wrote: >> >> Your body_file is not bytes, but st

Re: [pylons-discuss] Issues migrating dynamic CSV to Python3

2020-10-18 Thread Bert JW Regeer
Your body_file is not bytes, but str. You need to make sure that what you pass to body_file returns bytes. > On Oct 16, 2020, at 15:03, Jonathan Vanasco wrote: > > I discovered an issue with our code when generating dynamic CSVs under > Python3. I'm hoping someone can point me in the right di

Re: [pylons-discuss] Pyramid docs copyright

2020-09-25 Thread Bert JW Regeer
We have outstanding tickets for changing it, however the change has never been made as we are not sure of what the legalities are surrounding that change. So for now it is stuck under the current license, and it is very unlikely to ever change. Bert > On Sep 21, 2020, at 02:40, Hans-Peter Jans

Re: [pylons-discuss] Waitress how setup channel_timeout and max size limits

2020-05-20 Thread Bert JW Regeer
Hey Michal, Unfortunately there is nothing that will cause Waitress to kill a thread, because killing a thread in Python is not possible. The channel_timeout refers to how long a keep-alive connection stays open, a request that is processing in the WSGI thread will still be considered open, and

Re: [pylons-discuss] Generating URL using request.resource_url

2020-04-22 Thread Bert JW Regeer
Pass the current context. It should have lineage and thus know how to get to where you are right now. request.resource_url(request.context, '@@create') Bert JW Regeer > On Apr 22, 2020, at 14:05, Sydo Luciani wrote: > > Back to my original post, fixed the problem with stri

Re: [pylons-discuss] Deform demo site : The "click to show in context" link returns 404 Not Found

2020-04-11 Thread Bert JW Regeer
I don't know who runs that site/demo. The demo code can be found here: https://github.com/Pylons/deformdemo > On Apr 11, 2020, at 20:37, Sydo Luciani wrote: > > > The "click to show in context" link in Deform demo site is broken: > > http://demo.substanced.net/deformdemo/richtext/ > > Code (

Re: [pylons-discuss] Waitress and logrotation / USR2 signal

2020-03-27 Thread Bert JW Regeer
if I can find the configuration that > suppressed them. > > On Thu, Mar 26, 2020 at 10:25 PM Bert JW Regeer wrote: >> >> Waitress does not do any logging on its own, and thus doesn't handle any >> signals related to log rotation as it is not aware of any logs. >

Re: [pylons-discuss] Waitress and logrotation / USR2 signal

2020-03-26 Thread Bert JW Regeer
Waitress does not do any logging on its own, and thus doesn't handle any signals related to log rotation as it is not aware of any logs. You could run the application using a process manager and have the process manager restart the application, or even better have the process manager capture th

Re: [pylons-discuss] Waitress version 1.4.3 released -- upgrade as soon as possible

2020-02-03 Thread Bert JW Regeer
Hey all, As a heads up, and to allow for tracking security issues, this issue has now been assigned CVE ID: CVE-2020-5236 Thanks, Bert JW Regeer > On Feb 2, 2020, at 21:59, Bert JW Regeer wrote: > > Hey all, > > I just released a new version of Waitress to fix a bug

[pylons-discuss] Waitress version 1.4.3 released -- upgrade as soon as possible

2020-02-02 Thread Bert JW Regeer
, or: • open an issue at https://github.com/Pylons/waitress/issues (if not sensitive or security related) • email the Pylons Security mailing list: pylons-project-secur...@googlegroups.com (if security related) Thank you, Bert JW Regeer -- You received this message because you

Re: [pylons-discuss] upgraded to 1.4.2 and requests got stuck (load 1.0)

2020-02-02 Thread Bert JW Regeer
Just quickly following up on this. Thanks to Fil Zembowicz an issue was found in the regular expression used to parse incoming headers, which may lead to a denial of service. This has now been fixed in Waitress 1.4.3, please upgrade as soon as possible. https://pypi.org/project/waitress/1.4.3/

Re: [pylons-discuss] Client disconnected while serving ...

2020-01-29 Thread Bert JW Regeer
Yes, this just means that waitress hasn't finished sending the response back to the client before they disappeared. Nothing to worry about. Bert > On Jan 28, 2020, at 05:17, 'J G' via pylons-discuss > wrote: > > Hi, > > recently I switched from Zope 2 with builtin ZServer to Zope 4 with Wait

Re: [pylons-discuss] 'samesite' cookie attribute and Chrome changes

2020-01-23 Thread Bert JW Regeer
Not unless you are either: - Willing to do the work yourself or - Pay someone to do the work and provide it back upstream Pylons has no further development. > On Jan 22, 2020, at 11:22, Mike Orr wrote: > > P.S. The site is still on Python 2.7. Is there any hope of Pylons > becoming Python 3

Re: [pylons-discuss] 'samesite' cookie attribute and Chrome changes

2020-01-23 Thread Bert JW Regeer
SameSite as a whole is still experimental. To date there is no accepted RFC that updates the cookie RFC. All we have are RFC drafts filed by Google, that are all expired. The only real "standard" is what the majority of browsers implement, and even that is not something I can point to because e

[pylons-discuss] WebOb 1.8.6 has been released

2020-01-21 Thread Bert JW Regeer
://pypi.org/project/WebOb/1.8.6/ <https://pypi.org/project/WebOb/1.8.6/> Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-

Re: [pylons-discuss] upgraded to 1.4.2 and requests got stuck (load 1.0)

2020-01-09 Thread Bert JW Regeer
Another question: How long were you using 1.4.1 before you upgrade to 1.4.2? Did you use 1.4.0 for any period of time before that? I am trying to narrow down what the potential changeset could be. Thanks, Bert JW Regeer > On Jan 9, 2020, at 07:51, 'Peter Lada' via pylons-disc

Re: [pylons-discuss] upgraded to 1.4.2 and requests got stuck (load 1.0)

2020-01-09 Thread Bert JW Regeer
Does Heroku do any sort of request logging? Is there something you can turn on temporarily while investigating? The change between version 1.4.1 and 1.4.2 is very small: https://github.com/Pylons/waitress/compare/v1.4.1..v1.4.2 Witho

[pylons-discuss] Waitress 1.4.1 has been released

2019-12-24 Thread Bert JW Regeer
ress, or any Pylons Project, please do not hesitate to email us at: pylons-project-secur...@googlegroups.com <mailto:pylons-project-secur...@googlegroups.com> Thank you, Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" gro

[pylons-discuss] Waitress version 1.4.0 has been released

2019-12-20 Thread Bert JW Regeer
security related) on the Github issue tracker: https://github.com/Pylons/waitress/issues If you have a potential security issue in Waitress, or any Pylons Project, please do not hesitate to email us at: pylons-project-secur...@googlegroups.com Thank you, Bert JW Regeer -- You received this

[pylons-discuss] Venusian updates

2019-11-05 Thread Bert JW Regeer
you about dependencies getting updates! I have validated that 3.0.0 correctly has Requires-Python: >=3.5 set and pip won't install it on Python 2 or download it. Thanks all, and please let me know if there are any other issues you run into! Thanks, Bert JW Regeer -- You received this mes

Re: [pylons-discuss] GET, HEAD, the Guillotine middleware extension

2019-10-20 Thread Bert JW Regeer
If your WSGI application for instance does not natively support HEAD requests, because it only handles GET requests, you can use this middleware to do the rewrite, have your WSGI app return the whole response, and Guillotine will then return a body less response to the remote client. Bert > On

Re: [pylons-discuss] waitress - customer headers

2019-10-15 Thread Bert JW Regeer
This is due to your custom header containing an underscore. See https://github.com/Pylons/waitress/issues/194 for more information. Bert > On Oct 15, 2019, at 05:47, 'Roman S' via pylons-discuss > wrote: > > hi all, > > how do I allow a custom

Re: [pylons-discuss] most performant way to run WSGI app as single process

2019-09-17 Thread Bert JW Regeer
Unless you are using a version of sendfile that does TLS in the kernel, most of the benefits of sendfile disappear as soon as you enable TLS. All of the encryption is done in userspace and you can't use sendfile for that. Even if you use sendfile to send it to a reverse proxy, at some point it l

Re: [pylons-discuss] most performant way to run WSGI app as single process

2019-09-14 Thread Bert JW Regeer
Yeah, I've seen them. I don't care about them. Here's why: https://github.com/omedhabib/WSGI_Benchmarks/blob/master/src/app.py This is an unrealistic of a test as it can get. It does 0 I/O other than accepting a connection

Re: [pylons-discuss] most performant way to run WSGI app as single process

2019-09-11 Thread Bert JW Regeer
The answer is: it depends You can run whatever you'd like. I run waitress in production in a docker setup. But you can also use uWSGI for example to run your production, or gunicorn, or a large variety of other choices. What were you running before? Bert > On Sep 11, 2019, at 11:49, Alexande

[pylons-discuss] Waitress 1.3.1 has been released

2019-08-28 Thread Bert JW Regeer
waitress/issues> Thanks! Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To view this

[pylons-discuss] Waitress 1.3.1 has been released

2019-08-27 Thread Bert JW Regeer
waitress/issues> Thanks! Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To view this

Re: [pylons-discuss] Velruse… or what else?

2019-07-26 Thread Bert JW Regeer
Considering that I’m currently using Velruse > <https://github.com/bbangert/velruse/> and need to move on, are there any > recommendations from the community regarding Pyramid and OAuth2 to simplify > talking with auth providers (e.g. Google, Live, etc.)? Bert JW Regeer -- You

Re: [pylons-discuss] waitress: can not see the 4 default threads

2019-07-19 Thread Bert JW Regeer
> On Jul 19, 2019, at 02:18, Philip May wrote: > > Yes. I did confuse processes and threads... > Sorry for that. > > Do you know why they use threads instead of tasks (processes)? Because in most cases IO waiting time (through asyncore) is going to be the overwhelming amount of time, and so

Re: [pylons-discuss] waitress: can not see the 4 default threads

2019-07-18 Thread Bert JW Regeer
In very old versions of the Linux kernel (2.4.0 was when the change happened), threads would have their own pid because threads are implemented as processes... Although I am guessing that is not what is being referred to here. > On Jul 18, 2019, at 16:51, Michael Merickel wrote: > > processes

Re: [pylons-discuss] Authenticating with Oauth2/OpenID Connect

2019-07-10 Thread Bert JW Regeer
> On Jun 24, 2019, at 15:44, Jonathan Vanasco wrote: > > > On Friday, June 21, 2019 at 8:43:32 PM UTC-4, Mike Orr wrote: > But if I want to contribute to the enterprise's Single Sign-In, do I need to > tell the server the user is still logged into my application so it > doesn't expire the S

Re: [pylons-discuss] Authenticating with Oauth2/OpenID Connect

2019-05-17 Thread Bert JW Regeer
https://github.com/requests/requests-oauthlib > On May 17, 2019, at 14:26, Mike Orr wrote: > > I'm trying to get my Pyramid application to use a Keycloak > authentication server. Keycloak supports OAuth2 with OpenID Connect. I > don't need authorization: just authenticating the user and retrievi

Re: [pylons-discuss] Pyramid 1.10.4 released

2019-05-13 Thread Bert JW Regeer
> On May 13, 2019, at 12:33, Jonathan Vanasco wrote: > > > > On Monday, May 13, 2019 at 4:17:05 AM UTC-4, Steve Piercy wrote: > Done! > > https://pylonsproject.org/community-support.html > > https://trypyramid.com/documentation.html >

Re: [pylons-discuss] Pyramid 1.10.4 released

2019-05-10 Thread Bert JW Regeer
> On May 10, 2019, at 06:27, Steve Piercy wrote: > > Thank you for asking the questions. You've asked a couple of questions for > which we have not yet established and published clear procedures, so we'll > need to update our policies. > > https://pylonsproject.org/community-support.html >

[pylons-discuss] Waitress 1.3.0 has been released

2019-04-22 Thread Bert JW Regeer
Hey all, With hard work from our own Michael Merickel (thanks again!) I have released the latest and greatest version of waitress: 1.3.0 This new version contains a whole range of improvements to increase throughput and interactivity for applications that use a yielding app iter to do things l

[pylons-discuss] Waitress 1.3.0 beta 0 is now available

2019-04-11 Thread Bert JW Regeer
Hello everyone, With a giant shout-out to Michael Merickel for all his hard work on the latest version of waitress. Deprecations: - The send_bytes adjustment now defaults to 1 and is deprecated pending removal in a future release. It no longer changes how many bytes are placed into the socket

Re: [pylons-discuss] `reload` detecting changes to mako templates (again)

2019-03-29 Thread Bert JW Regeer
Mako templates are compiled and imported, when that file is updated the reloader likely sees it, unless it is detecting the file changing on disk. For the former: I am not sure how to necessarily stop that from happening... but For the latter I would try the new ignore files feature that Michael

Re: [pylons-discuss] Pylons Project Assimilation team meeting minutes from 2019-02-25

2019-02-28 Thread Bert JW Regeer
tl;dr: Nothing will change for users of the Pylons Projects, for development there will be minor changes required in the near future. > On Feb 28, 2019, at 14:53, Steve Piercy wrote: > > Howdy, > > I assume you've all read the minutes, so I won't repeat them, except to > emphasize specific po

Re: [pylons-discuss] Can waitress replace mongoose in a python web app?

2019-02-05 Thread Bert JW Regeer
Hello Stuart, How are you currently running your application? I am not familiar with Mongoose. Bert > On Feb 5, 2019, at 13:38, Stuart wrote: > > As an amateur Python coder I am looking for a little help... > > Having read about waitress, I feel it might be a good step up from mongoose > whi

Re: [pylons-discuss] Introducing pyramid-resource

2019-02-04 Thread Bert JW Regeer
Absolutely! Please share your pyramid add-ons and packages :-). This looks great, and something that I too have written many a time for various projects! > On Feb 4, 2019, at 18:27, Theron Luhn wrote: > > Hi all, > > I hope it's okay to share some of my Pyramid packages on the mailing list. >

[pylons-discuss] Waitress 1.2.1

2019-01-25 Thread Bert JW Regeer
re no other new changes. Please file issues here: https://github.com/Pylons/waitress/issues <https://github.com/Pylons/waitress/issues> Installing it from PyPI (https://pypi.org/project/waitress/ <https://pypi.org/project/waitress/>): pip install waitress==1.2.1 Thanks, Bert JW

[pylons-discuss] Waitress 1.2.0 has been released

2019-01-15 Thread Bert JW Regeer
changelog on PyPi: https://pypi.org/project/waitress/1.2.0/ <https://pypi.org/project/waitress/1.2.0/> To install: pip install waitress=1.2.0 If you run into any issues or concerns please file them here: https://github.com/Pylons/waitress/issues Thank you, Bert JW Regeer -- You receive

Re: [pylons-discuss] Waitress 1.2.0 beta 1

2019-01-07 Thread Bert JW Regeer
> On Jan 7, 2019, at 17:18, Bert JW Regeer wrote: > > > >> On Jan 7, 2019, at 16:29, Jonathan Vanasco > <mailto:jonat...@findmeon.com>> wrote: >> >> >> >> On Monday, January 7, 2019 at 5:00:43 PM UTC-5, Jonathan Vanasco wrote:

Re: [pylons-discuss] Waitress 1.2.0 beta 1

2019-01-07 Thread Bert JW Regeer
> On Jan 7, 2019, at 16:29, Jonathan Vanasco wrote: > > > > On Monday, January 7, 2019 at 5:00:43 PM UTC-5, Jonathan Vanasco wrote: > > It would be nice if that functionality could be implemented as middleware > when not running the waitress server. > > This release broke our dev systems f

Re: [pylons-discuss] Waitress 1.2.0 beta 1

2019-01-03 Thread Bert JW Regeer
iting to be processed. You can disable logging of that warning by disabling logging for waitress.queue, using the standard Python logging setup. Bert > On Jan 3, 2019, at 03:06, Lele Gaifax wrote: > > Bert JW Regeer writes: > >> It was a simple change, uploaded a ne

Re: [pylons-discuss] Waitress 1.2.0 beta 1

2019-01-02 Thread Bert JW Regeer
It was a simple change, uploaded a new version. https://pypi.org/project/waitress/1.2.0b2/ <https://pypi.org/project/waitress/1.2.0b2/> pip install waitress==1.2.0b2 Thanks, Bert > On Jan 2, 2019, at 13:32, Bert JW Regeer wrote: > > That looks to be correct. I'll see if

Re: [pylons-discuss] Waitress 1.2.0 beta 1

2019-01-02 Thread Bert JW Regeer
950255882f129d770a9645b/waitress/task.py#L351 > > <https://github.com/Pylons/waitress/blob/01ae68065f46b7b04950255882f129d770a9645b/waitress/task.py#L351> > On Wed, Jan 2, 2019 at 10:14 AM Lele Gaifax <mailto:l...@metapensiero.it>> wrote: > Hi, > > Bert JW Reg

[pylons-discuss] Waitress 1.2.0 beta 1

2018-12-31 Thread Bert JW Regeer
/waitress/1.2.0b1/ <https://pypi.org/project/waitress/1.2.0b1/> pip install waitress=1.2.0b1 Thank you, Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails

Re: [pylons-discuss] Security Headers + Extras Project

2018-12-10 Thread Bert JW Regeer
Pyramid also by default supports all of the "secure" parts of the cookie. There are no extra flags that can't already be set using Pyramid. Using the Secure package for cookies is unnecessary. Bert > On Dec 9, 2018, at 13:35, Jonathan Vanasco wrote: > > I may have missed something, but it loo

[pylons-discuss] WebOb 1.8.3 has been released

2018-10-14 Thread Bert JW Regeer
ues <https://github.com/Pylons/webob/issues> Thank you, Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubs

Re: [pylons-discuss] Store class at process start, and use it to initiate inside function?

2018-10-09 Thread Bert JW Regeer
I would disagree, heavily. You want to create your globals once, then fork. This way the memory used by said global can be shared between all of the processes. Instagram even added the ability to freeze items so that they don't go through the normal GC cycle and thus don't accidentally cause COW

Re: [pylons-discuss] Store class at process start, and use it to initiate inside function?

2018-10-09 Thread Bert JW Regeer
You run the same code at configure time and load it once per process. Even if you do this once at request time or once at configure time you have to do it once per process. > On Oct 9, 2018, at 00:00, Thierry Florac wrote: > > And how do you handle such use case when working in a > multi-proc

Re: [pylons-discuss] some waitress design questions

2018-07-18 Thread Bert JW Regeer
> On Jul 17, 2018, at 22:40, Jonathan Vanasco wrote: > > > > On Tuesday, July 17, 2018 at 7:46:59 PM UTC-4, Bert JW Regeer wrote: > The threads that run the WSGI app are pre-spawned, they wait on a new request > to be added to a queue, peel one off, pass it down t

Re: [pylons-discuss] some waitress design questions

2018-07-17 Thread Bert JW Regeer
The threads that run the WSGI app are pre-spawned, they wait on a new request to be added to a queue, peel one off, pass it down the WSGI app, and then back. There are no other "workers". The rest is a simple asyncore loop, whereby requests are accepted, and added to the list of sockets to liste

Re: [pylons-discuss] WebOb 1.8.2 has been released

2018-06-06 Thread Bert JW Regeer
I was wrong, I did back port it: https://github.com/Pylons/webob/commit/1c91f51fd5491870200ea7d024f7c1fdca5b9a9c > On Jun 6, 2018, at 12:04 , Bert JW Regeer wrote: > > This has been the case since 1.7.0 was released… > > See > https://docs.pylonsproject.org/projects/webob/

Re: [pylons-discuss] WebOb 1.8.2 has been released

2018-06-06 Thread Bert JW Regeer
This has been the case since 1.7.0 was released… See https://docs.pylonsproject.org/projects/webob/en/stable/whatsnew-1.7.html#backwards-incompatibility specifically: - Response.set_cookie no longer accepts a key argument. This was deprecated in WebOb 1.5 and as mentioned in the deprecation, i

[pylons-discuss] WebOb 1.8.2 has been released

2018-06-05 Thread Bert JW Regeer
Docs https://docs.pylonsproject.org/projects/webob/en/1.8-branch/index.html <https://docs.pylonsproject.org/projects/webob/en/1.8-branch/index.html> Issues https://github.com/pylons/webob/issues <https://github.com/pylons/webob/issues> Thanks, Bert JW Regeer -- You received this

Re: [pylons-discuss] is it possible to execute code at a certain point in accessing a view?

2018-05-06 Thread Bert JW Regeer
icular view. Do note that ValidationFailure takes the marshmallow errors/or your validation function's output and I have a special view that handles ValidationFailures by turning them into HTTPBadRequest's with extra information on what part of the validation failed/why. Anyway, you g

Re: [pylons-discuss] Pyramid 1.9.2 released

2018-04-24 Thread Bert JW Regeer
Thanks Michael! > On Apr 23, 2018, at 23:20, Michael Merickel wrote: > > Pyramid 1.9.2 has been released. > > The full changelog is here: > https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/changes.html >

Re: [pylons-discuss] API file upload

2018-04-18 Thread Bert JW Regeer
request.body_file will protect you against bad WSGI servers/clients not sending appropriate headers. It'll return you something that you can read from, even if it is 0 bytes. It will also not let you read past the end of the input. request.body_file_seekable will return the same thing as request

Re: [pylons-discuss] API file upload

2018-04-18 Thread Bert JW Regeer
Using request.body_file is actually better than using body_file_raw. The raw reads directly from the underlying wsgi.input, which means if you are using wsgiref or some other server that doesn't correctly input terminate wsgi.input you may potentially deadlock reading forever because the wsgi.in

[pylons-discuss] WebOb 1.8.1 has been released

2018-04-10 Thread Bert JW Regeer
Good evening, I've released WebOb 1.8.1 which contains a small fix to lessen the impact of the new Accept handling that was added to WebOb 1.8.0 when still using the old MIMEAccept API. No further changes were made in this release. Changelog: https://docs.pylonsproject.org/projects/webob/en/1.

[pylons-discuss] WebOb 1.8.0 has been released

2018-04-04 Thread Bert JW Regeer
contributors and people that have made this release happen! Cheers, Bert JW Regeer -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus

Re: [pylons-discuss] Pyramid + SQLAlchemy + PostgreSQL: idle connections

2018-04-02 Thread Bert JW Regeer
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 wrote: >> >> >> On Monday, April 2

Re: [pylons-discuss] Pyramid + SQLAlchemy + PostgreSQL: idle connections

2018-04-02 Thread Bert JW Regeer
> On Apr 2, 2018, at 09:54, Jonathan Vanasco wrote: > > I don't know why it was removed from the cookiecutter. > > It's been present in the cookbook and docs for years, see the cookbook: > > https://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/database/sqlalchemy.html > >

Re: [pylons-discuss] Waitress-serve and circus

2018-03-25 Thread Bert JW Regeer
No, Waitress does not allow you to provide it an already existing file descriptor. > On Mar 24, 2018, at 16:34, Kirk D wrote: > > Is there a way i can set the fd using waitress-serve? > > I want to use it in combination with circus. > > > -- > You received this message because you are subsc

Re: [pylons-discuss] Problems building a REST API using Pyramid

2018-02-18 Thread Bert JW Regeer
You are overriding __getitem__ in auth, so your usual dict.__getitem__ isn't invoked. You are returning an `auth` object from your overrides __getitem__. > On Feb 17, 2018, at 09:53, Einar Johnson wrote: > > Hi, > I am trying to resolve this issue: > https://stackoverflow.com/questions/4882686

Re: [pylons-discuss] What’s the type of `request` in an exception view?

2018-01-28 Thread Bert JW Regeer
During exception handling pyramid_tm will have already rolled back, and the database session is no longer valid for use. Any access will cause sqlalchemy to raise. Please verify you are using the latest version of Pyramid and pyramid_tm, and then read this note: https://docs.pylonsproject.org/

Re: [pylons-discuss] Confused with parameter `request` in exception views.

2018-01-28 Thread Bert JW Regeer
Hey, This is a known issue with the way we add new attributes and functions to the request object. pyramid.util.Request does not exist. pyramid.request.Request is still the underlying object. This has been fixed in https://github.com/Pylons/pyramid/pull/3129. Bert > On Jan 27, 2018, at 14:01,

Re: [pylons-discuss] most of docs.pylonsproject.org down.

2018-01-11 Thread Bert JW Regeer
Hey, This issue has now been resolved. Apologies for the delay. Disk ran out of space. We’ve taken steps to make sure this is unlikely to happen again. Bert > On Jan 11, 2018, at 08:30, Bert JW Regeer wrote: > > I’ve notified the appropriate people, now it’s waiting for them t

Re: [pylons-discuss] most of docs.pylonsproject.org down.

2018-01-11 Thread Bert JW Regeer
I’ve notified the appropriate people, now it’s waiting for them to wake up. Please be patient. If you need the Pyramid documentation, you can as a work-around find them here: http://pyramid.readthedocs.io/en/latest/ Please be patient with us. Thank y

[pylons-discuss] WebOb 1.8.0rc1 has been released

2018-01-01 Thread Bert JW Regeer
Pyramid 1.9, so hopefully this upgrade to better Accept handling will be smooth (https://travis-ci.org/bertjwregeer/webobpyramidcompattesting/ <https://travis-ci.org/bertjwregeer/webobpyramidcompattesting/>). Installation: pip install webob==1.8.0rc1 Thank you, Bert JW Regeer -- You

Re: [pylons-discuss] modul

2017-12-13 Thread Bert JW Regeer
Pyramid has an asset override system: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/assets.html#overriding-assets > On Dec 13, 2017, at 05:21, Julien Cigar wrote: > > Hello, > > I have a "core" CMS-like home made package which I'd like to modularize it a > bit to be reusable.

Re: [pylons-discuss] CSRF token implementation

2017-12-12 Thread Bert JW Regeer
I’m trying to follow what you are saying… and none of it is making any sense. > On Dec 12, 2017, at 12:15, Jonathan Vanasco wrote: > > you're absolutely correct. i used a very bad choice of words and should > have been specific because I was thinking of something weird. i meant to > refer to

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

2017-11-15 Thread Bert JW Regeer
> On Nov 15, 2017, at 08:05, Tres Seaver wrote: > > On 11/14/2017 09:25 AM, webmas...@johlia.de > wrote: > >> I have a pyramid application. How can I change the content_type to >> problem+json (as defined in: https://tools.ietf.org/html/rfc7807#page-9) > > Interesting -- thanks for pointing

Re: [pylons-discuss] Recommended way to modify view return value

2017-10-29 Thread Bert JW Regeer
You can place a view deriver before the view is rendered by the current renderer. Unless you are returning a Response object directly from your view, you’d get the dictionary. For example, here are the default view derivers that Pyramid includes: https://github.com/Pylons/pyramid/blob/master/py

[pylons-discuss] Waitress 1.1.0 has been released

2017-10-10 Thread Bert JW Regeer
, please file an issue here: https://github.com/pylons/waitress/issues Thank you, Bert JW Regeer -- 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 pylo

Re: [pylons-discuss] pyramid and react working together?

2017-08-25 Thread Bert JW Regeer
ES7 with Babel and you get the same thing. Let the transpiler worry about converting it to something the browser is happy with. Other thing is that he mentioned wanting to write both a web app and a mobile app, using React with React-Native for the mobile app and React-Dom for the web may allow

Re: [pylons-discuss] pyramid and react working together?

2017-08-24 Thread Bert JW Regeer
Nothing like that exists… although it doesn’t need to. Write your Pyramid app as a simple REST api that exposes a bunch of endpoints that speak JSON. Put authentication and registration on there like you would with any API. Then as a completely separate application write your React app using wh

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

2017-08-03 Thread Bert JW Regeer
> On Aug 3, 2017, at 15:07, Chris Withers <mailto:ch...@withers.org>> wrote: > > > > On 03/08/2017 22:04, Chris Withers wrote: >> On 03/08/2017 19:12, Bert JW Regeer wrote: >>> You can grab it from a .ini or wherever when using the latest Pyramid &

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

2017-08-03 Thread Bert JW Regeer
You can grab it from a .ini or wherever when using the latest Pyramid with plaster support (write your own loader to load it from yaml files for example). I guess it is not entirely clear, but here’s docs for the two methods: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/enviro

Re: [pylons-discuss] AuthTktAuthenticationPolicy: Behaviour of "wild_domain" option unclear.

2017-08-03 Thread Bert JW Regeer
We shouldn’t be sending two cookies anymore since browsers treat both .my-app.foo.example.com and my-app.foo.example.com the same, so we could save some request bandwidth, but that is another ticket for later. In other words, wild_domain being set to True or False makes no difference anymore.

Re: [pylons-discuss] How to add protocal info for webob.Response?

2017-07-23 Thread Bert JW Regeer
Hello Pengyu, A Response() object by itself does not have any information about the HTTP protocol used to create the request. It is simply an object that implements the WSGI required handlers, which provides the information you see below: 1. Status Code 2. headers 3. body if applicable The req

[pylons-discuss] WebOb 1.7.3 has been released

2017-06-30 Thread Bert JW Regeer
WebOb 1.7.3 has been released. Here are the changes: - Bugfixes related to HTTP_HOST handling when Host header contains an IPv6 address. You can install it via PyPI: pip install webob==1.7.3 Enjoy, and please report any issues you find to the issue tracker at https://github.com/Pylons

Re: [pylons-discuss] Site https://docs.pylonsproject.org is not working

2017-06-29 Thread Bert JW Regeer
> On Jun 29, 2017, at 12:55, Steve Piercy wrote: > > On 6/29/17 at 3:33 PM, c...@online.de (Christoph Zwerschke) pronounced: > >> Am 29.06.2017 um 15:07 schrieb Marcin Raczyński: >>> It is working now. >> >> see also https://github.com/rtfd/readthedocs.org/issues/2981 > > What can we do when

Re: [pylons-discuss] Site https://docs.pylonsproject.org is not working

2017-06-29 Thread Bert JW Regeer
> On Jun 29, 2017, at 13:34, Jonathan Vanasco wrote: > > > > On Thursday, June 29, 2017 at 2:55:55 PM UTC-4, Steve Piercy wrote: > What can we do when RTD has an outage? > > You may be able to minimize an outage by using a free CloudFlare or similar > account. Usually you can keep somethin

  1   2   3   >