Live data from Hacker News

Flask 2.0.0 has been merged into master

github.com

21–30 of 55 posts

Re: Flask 2.0.0 has been merged into master

#21
post #6

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

I've moved most of my Flask projects to Express and NodeJS. Flask was just a PITA to deploy properly in a way that it could handle lots of concurrent connections without a massive memory footprint, and async in Python is a mess. The JS ecosystem has on the other hand moved to async and Promises as the standand/default way to implement things, which makes things much easier. Express middleware is also just easier to w…

> and async in Python is a mess

I’ve heard this a lot of late, but it’s not clear to me why. Would you be willing to expand on your assertion?

Personally, I’ve written a fair chunk of typescript and asyncio based Python over the year for a project and in general I think Python has done an excellent job of their implementation.

Some things are annoying; for example I’ve a consistent case, which I haven’t pared down to better understand, where by exceptions in a coro are never visible. Not to be confused with the classic case of being notified of the exception when your process shuts down.

OTOH some things are really amazing, for example PYTHONASYNCIODEBUG=1. More so the ability to wrap non async, typically blocking, code in an Executor and it “magically” (via thread pools) work in the event loop has also been a boon for the type of work I’m engaged in.

Waaaaay back, I was really hurt by twisted and to a lesser extent tornado. But the async stuff shipped in 3.9x seems completely comparable to JavaScript imho.

Re: Flask 2.0.0 has been merged into master

#22
I am disappointed this release does not introduce any functionality similar to the Flask-Classful project.

I find built-in MethodViews very limited and unable to capture context.

Furthermore, MethodViews force you to artificially split endpoints between multiple classes when functionality better belongs in a single class.

https://flask-classful.teracy.org/#using-custom-routes

Re: Flask 2.0.0 has been merged into master

#24

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.

Re: Flask 2.0.0 has been merged into master

#26

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.

Considering it’s a very common touch point as a flask developer it’s great to see.

Re: Flask 2.0.0 has been merged into master

#27
post #2

In case anyone is interested in the major changes in 2.0.x: https://flask.palletsprojects.com/en/master/changes/

> Warning: This is the development version. The latest stable version is Version 1.1.x.

I couldn't find a way to close the top banner. So I clicked around and found out this page had a bug. In the bottom right corner there is button to select the version of flask.

1. click v2.0.x, works fine

2. click v1.1.x, 404 page not found

3. click v2.0.x again, 404 page not found

Re: Flask 2.0.0 has been merged into master

#28

Honestly, I thought flask was mostly just in maintenance mode. Glad to see it progress!

No point in iterating once you reach perfection.

Definitely not perfection. But yes, we shouldn't see "complete project" as a bad thing.

Re: Flask 2.0.0 has been merged into master

#29
post #2

In case anyone is interested in the major changes in 2.0.x: https://flask.palletsprojects.com/en/master/changes/

At the very bottom: "Add type hinting." I love that this happens to larger libraries now. It doesn't need to be 100% complete, but it will still improve many devs' lives. I hope it will become the default for new projects and major updates.

How Steve Wozniak wrote anything by paper, much less BASIC for the Apple I, is beyond me...

He and his kind are in a different reality

Re: Flask 2.0.0 has been merged into master

#30
post #5

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

As casual python user I found Flask really nice for my projects

Agree, went from rough concept to PoC in an hour with Flask.
Post reply on HN