Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:39
    webknjaz commented #1873
  • 00:38
    webknjaz commented #1873
  • 00:34
    liamstask commented #1873
  • Nov 29 19:54
    webknjaz closed #1893
  • Nov 29 19:54

    webknjaz on master

    Travis CI: Upgrade mainstream_p… Travis tests on Python 3.9.0 Update .travis.yml and 1 more (compare)

  • Nov 29 19:49
    webknjaz closed #1892
  • Nov 29 19:49

    webknjaz on master

    Fix text_block() to ignore the … White quotes Update test_bus.py and 3 more (compare)

  • Nov 29 19:42
    webknjaz edited #1892
  • Nov 29 19:28
    cclauss synchronize #1892
  • Nov 29 08:28
    cclauss edited #1893
  • Nov 29 08:28
    cclauss synchronize #1893
  • Nov 29 07:56
    cclauss edited #1893
  • Nov 29 07:56
    cclauss synchronize #1893
  • Nov 29 07:52
    cclauss edited #1893
  • Nov 29 07:17
    cclauss opened #1893
  • Nov 29 00:10
    cclauss synchronize #1892
  • Nov 29 00:04
    cclauss synchronize #1892
  • Nov 28 23:42
    cclauss synchronize #1892
  • Nov 28 23:26
    cclauss opened #1892
  • Nov 28 22:33
    webknjaz closed #1888
Jason R. Coombs
@jaraco
@webknjaz Apologies for the delay. I’m fine with yanking the releases, especially if they have releases that supersede and fix the issue.
Jason R. Coombs
@jaraco
I’ve yanked them now. Let’s see how that goes.
Sviatoslav Sydorenko
@webknjaz
:+1:
Farooq Karimi Zadeh
@farooqkz
What config attribute for request should I use to limit its body size?
I got lost in cherrypy and cheroot's source code...
Timothy Boyden
@boydenus
server.maxRequestSize (cherrypy/cherrypy#90)
Looks like the config names have been updated since then though. A more recent StackOverflow posts says: server.max_request_body_size (https://stackoverflow.com/questions/13002676/python-sending-and-receiving-large-files-over-post-using-cherrypy)
Sviatoslav Sydorenko
@webknjaz
Sviatoslav Sydorenko
@webknjaz
Farooq Karimi Zadeh
@farooqkz
@webknjaz Thank you! I was looking for something like request.max_body_size because I was setting per request config.
I have more questions: Any marketplace for open source cherrypy apps?
Farooq Karimi Zadeh
@farooqkz
And I need to call a method on my app's instance. After ducking I realized Plugin is the thing to go. How to access my app's instance from my plugin? maybe through Bus?
Sviatoslav Sydorenko
@webknjaz
no marketplace, maybe search on github
Sviatoslav Sydorenko
@webknjaz
what do you mean by an app instance? why do you need methods there?
Farooq Karimi Zadeh
@farooqkz
I want to call a method of my App object on stop
Sviatoslav Sydorenko
@webknjaz
Yeah I guess make a plugin
Farooq Karimi Zadeh
@farooqkz
But how should I achieve what I want? I want to call a method of my App object when the bus is stopping or has stopped or inform my App somehow. I need some hints as seems there is no way to access App's instance/object through cherrypy.engine and I couldn't find a way to make my App subscribe to some channel.
Sviatoslav Sydorenko
@webknjaz
Pass your app object to the plugin constructor and maintain access via an instance attribute
Farooq Karimi Zadeh
@farooqkz
hmm. Thanks this idea will work probably
Farooq Karimi Zadeh
@farooqkz
It worked. How to tell cherrypy to create for example 16 processes rather than 16 threads?
I know they are costy but there are environments in which I need to do that
Sviatoslav Sydorenko
@webknjaz
CherryPy (rather Cheroot now) is thread-based like every other synchronous web framework. You could probably attempt to completely reimplement https://github.com/cherrypy/cheroot/blob/master/cheroot/workers/threadpool.py but it's not worth it.
You can use some external load balancer that would spawn separate processes for your app, if you really need to.
Farooq Karimi Zadeh
@farooqkz
My server binds to a UNIX socket. So I guess load balancing is not possible.
Sviatoslav Sydorenko
@webknjaz
unless your proxy binds there and the CherryPy app uses a bunch of other locations
Farooq Karimi Zadeh
@farooqkz
How is static file caching in CherryPy?
João Pinto
@joaompinto
if you use the regular static modules you get regular filesystem caching
Florian Bruhin
@The-Compiler
@webknjaz @jaraco FWIW it'd be nice if yanked issues had a reason why they were yanked set - I can't use 8.4.4 and .5 due to cherrypy/cheroot#328, so I was wondering if I should use 8.4.3 or (that and .2 being yanked) 8.4.1.
Florian Bruhin
@The-Compiler
Also, sorry if I was a bit too terse :) I really appreciate the work you all do, I've been using cherrypy/cheroot as a WSGI server for integration tests of my project (qutebrowser.org) for over 5 years with almost no issues in all that time!
@jaraco hmm, looks like you're in FUNDING.yml but not signed up to GitHub Sponsors? I get https://i.imgur.com/Z9CzlQs.png when clicking the sponsor button
Sviatoslav Sydorenko
@webknjaz
@The-Compiler I'm almost sure that you'd want to use something before the yanked releases — the recent refactorings haven't been as stable as I'd prefer them to be and so we need some regression fixes to get the stability back — that's why they are yanked. Once I'll have time to do the PR reviews, maybe we'll fix all of the regressions spotted...
João Pinto
@joaompinto
what is version before the refactoring ?
Sviatoslav Sydorenko
@webknjaz
@joaompinto well, using selectors got introduced in 8.4.0 and that's what brought the most regressions lately, I think... So you may want to consider something before that. OTOH there was a performance regression in 8.1.0 that got fixed in 8.4.2 so there's that
João Pinto
@joaompinto
@webknjaz thanks
João Pinto
@joaompinto
I have read about a strategy about using a thread to manage db connections and provide them to the web handling threads via queues, does someone have some example code with something similar ? I am mostly curious if this can be integrated with the ceroot bus/thread manager.
Sviatoslav Sydorenko
@webknjaz
@joaompinto Cheroot does not have a bus concept, CherryPy does
João Pinto
@joaompinto
João Pinto
@joaompinto
reading it with more attention, it does not match entirely my requirement because the plugin runs in the calling thread, it is thread safe because of the sqlalchemy scoped_session. I guess for my case I will need to explicitly create a thread from the plugin to manage the connection requests
João Pinto
@joaompinto
I guess I need a "QueueMonitor" with a "QueueBackgroundTask"
ajyoung
@ajyoung
@webknjaz -- re: 210 -- I didn't follow your last comment. The test succeeds under python3, it doesn't fail. But on python 2.7, at least under CentOS 7.5.1804, the test suite doesn't run.
OH, sorry.... you're saying socket in python2 doesn't support CM while in python3, it does. Right?
Argh. I'll dig on that.
ajyoung
@ajyoung
Still don't know why on my system the tests don't run under python2.7 but I guess if I can get them to run on the CI server, that may be enough
Sviatoslav Sydorenko
@webknjaz
@ajyoung what exactly doesn't work for you locally?
ajyoung
@ajyoung
@webknjaz Some of the python 2.7 tests don't pass locally but that is ok since they pass on the CI. I can just run them on the CI and wait for those results. What is more concerning is that the test doesn't fail when run against master (without the fix for 210). I'll work on the changes to the exception type you suggested and then try again.
Sviatoslav Sydorenko
@webknjaz
@ajyoung some tests may be flaky. If not, this is totally worth exploring. At least until we drop py2