This is huge. (Serious!) https://github.com/pallets/flask/pull/3907 Add route decorators for common HTTP methods. For example, @app.post("/login") is a shortcut for @app.route("/login", methods=["POST"]).
> This is huge. I consider this to be a minor syntactic sugar.
Flask 2.0.0 has been merged into master
51–55 of 55 posts
Re: Flask 2.0.0 has been merged into master
#52Earlier quoted context omitted.
Seems pretty painless to me: $ python3 -m asyncio >>> from requests import get >>> url = 'https://example.com' >>> response = await asyncio.to_thread(get, url) A lot of Python libraries now offer async APIs, have async support on their short term roadmaps, or other async projects have replaced them.
oh neat! I did not know about asyncio.to_thread; I've been using the longer form thread executor pattern.
Re: Flask 2.0.0 has been merged into master
#53Earlier quoted context omitted.
oh neat! I did not know about asyncio.to_thread; I've been using the longer form thread executor pattern.
I hadn't seen that either - looks like it's new in Python 3.9: https://docs.python.org/3/library/asyncio-task.html#asyncio....
Re: Flask 2.0.0 has been merged into master
#54Earlier quoted context omitted.
Writing code by hand isn't too bad, especially with a good language like LISP. I don't think it requires too much extra effort, just more attention and care as to not make syntax mistakes. With near-instant compile times and auto-linting, we sort of lose the ability to auto-vet code before inputting it.
I think it is a bit deep than that. I love LISP to death but I would never trade a ML language for LISP for writing code that goes into production.
Re: Flask 2.0.0 has been merged into master
#55Earlier quoted context omitted.
I think it is a bit deep than that. I love LISP to death but I would never trade a ML language for LISP for writing code that goes into production.
Many people put Lisp into production, even in very demanding environments, just fine...