Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 19 19:33
    CaselIT commented #1900
  • May 19 15:59
    vytas7 commented #1900
  • May 19 15:59
    codecov[bot] commented #1900
  • May 19 15:59
    vytas7 commented #1900
  • May 19 15:58
    codecov[bot] commented #1900
  • May 19 15:58
    codecov[bot] commented #1900
  • May 19 15:56
    codecov[bot] commented #1900
  • May 19 15:56
    codecov[bot] commented #1900
  • May 19 15:55
    vytas7 synchronize #1900
  • May 19 15:45
    codecov[bot] commented #1900
  • May 19 15:44
    codecov[bot] commented #1900
  • May 19 15:43
    codecov[bot] commented #1900
  • May 19 15:41
    codecov[bot] commented #1900
  • May 19 15:41
    kgriffs commented #1900
  • May 19 15:41
    codecov[bot] commented #1900
  • May 19 15:41
    kgriffs synchronize #1900
  • May 19 15:24
    codecov[bot] commented #1900
  • May 19 15:23
    codecov[bot] commented #1900
  • May 19 15:23
    codecov[bot] commented #1900
  • May 19 15:21
    codecov[bot] commented #1900
Vytautas Liuolia
@vytas7
Commented now :arrow_upper_left:
Kurt Griffiths
@kgriffs
LGTM once the gates all pass
Federico Caselli
@CaselIT
Not sure if I went a bit overboard with that error
but I guess it's not a large change the the current execpt ValueError will continue to work fine
Kurt Griffiths
@kgriffs
I like it
Kurt Griffiths
@kgriffs
Couple of docstring suggestions
apologies, forgot to check those in previous review
Federico Caselli
@CaselIT
no worries, the pipeline is not happy anyway, so I had to update again :)
Kurt Griffiths
@kgriffs
:boom: flake8 :boom:
Federico Caselli
@CaselIT
I missed a plugin locally
Kurt Griffiths
@kgriffs
I'm about to turn on a lint gate at work, but first I have to go fix everyone's inconsistent Python style things.
Also giving up the battle for single quotes. black will have us all behaving like animals before long. ;)
Federico Caselli
@CaselIT
I too resigned myself :(
Kurt Griffiths
@kgriffs
Somehow I never read this until now: https://mtlynch.io/code-review-love
Actually matches well with my own experience
maxking
@maxking:matrix.python-gsoc.org
[m]
Try blue if you also don’t love double quotes from black 😄
Kurt Griffiths
@kgriffs
WAT
That's kind of awesome.
Barry Warsaw is my spirit animal.
Vytautas Liuolia
@vytas7
Yeah blue has been on my radar as well, I think I already saw @maxking:matrix.python-gsoc.org mention it somewhere.
We have already configured Falcon to use black with single quotes though:)
3 replies
Vytautas Liuolia
@vytas7
It would be great to get rid of the sad face (): on a newline) while at it too, IMHO :)
Federico Caselli
@CaselIT
Blue looks nice
Vytautas Liuolia
@vytas7

Btw I saw that the Responder framework, which is inspired by both Falcon and Flask (but based on Starlette), supports on_request in addition to on_get, on_post, etc.

Responder itself is sorta dead, but I was thinking to myself whether this on_request could be a good idea for us to unify resources and sinks? I haven't checked whether in Responder on_request is fired for all methods in addition to, e.g., on_get, or only if a specific responder is not found (would probably make more sense this way).

Federico Caselli
@CaselIT
oh so similar to the default bahaviour of flask that will call the same method for all methods?
Vytautas Liuolia
@vytas7
Well not sure I understood it right, but as I understand, you create a Resource class like in Falcon
class Resource:
    def on_get(self, req, resp):
        pass
    def on_request(self, req, resp):
        pass
Smth like that
Ah yeah they support decorators like Flask too, but it doesn't mean that we want that part.
Kurt Griffiths
@kgriffs
I like it
Kurt Griffiths
@kgriffs
6 replies
Federico Caselli
@CaselIT
3 replies
maxking
@maxking:matrix.python-gsoc.org
[m]
He is nice, I’ve met him a couple of times
Vytautas Liuolia
@vytas7
I'm all for switching to blue. After all, blue seems to be the new black.
I know I'm in the minority of the 79-char line length, but in seems that blue does get even this one right. :smiling_imp:
Federico Caselli
@CaselIT
will update the gates etc
since most ides have support for black, I think it's worth it keeping its config too, so that's convenient for people.
Vytautas Liuolia
@vytas7
That's a double-edged sword though. Those IDEs might be willing to blacken code, which would then need to be reformatted with blue.
But blue does understand black's config?
Federico Caselli
@CaselIT
no
I tried without adding one and it did linebreaks at 79
so it's ignoring black 88
Vytautas Liuolia
@vytas7
Ah I see you added a separate section for blue.
Well, I'm not opposed to keeping both, at least during the transition period.
Vytautas Liuolia
@vytas7

@maxking:matrix.python-gsoc.org It seems that the Mailman gate has failed with some rather cosmetic error, do you possibly know what could be causing this?

AssertionError: 'Python 3.10.4 (main, May 16 2022, 04:27:45) [GCC 9.4.0] on linux' != 'Python 3.10.4 (main, May 16 2022, 04:27:45) [GCC 9.4.0] on linux '
- Python 3.10.4 (main, May 16 2022, 04:27:45) [GCC 9.4.0] on linux
+ Python 3.10.4 (main, May 16 2022, 04:27:45) [GCC 9.4.0] on linux 
?                                                                 +

https://github.com/falconry/falcon/runs/6460407571?check_suite_focus=true

(The diff is merely one trailing space.)
Vytautas Liuolia
@vytas7
I'll try rerunning just for the heck of it. :arrow_up:
maxking
@maxking:matrix.python-gsoc.org
[m]
Sorry, I’ve been traveling so haven’t had a chance to take a look at it, but doctests can sometimes be annoying about whitespaces. I’ll try to see what’s going on as soon I can.
Vytautas Liuolia
@vytas7
No worries, it is not that urgent :wink:
Kurt Griffiths
@kgriffs
added the news fragment: falconry/falcon#1900