New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is Hatch officially recommended by PyPA over Flit? #613
Comments
I think that FastAPI PR gives a slightly misleading impression. Flit supports the same standards as Hatch, it would have been totally possible to update the metadata to use the PyPA doesn't recommend any specific tool, as far as I'm aware. At some point I asked that Flit not be presented as the default in the packaging tutorial, because I don't want people to think it's 'the officially recommended tool'. PyPA once appeared to recommend pipenv, and then a lot of people got upset with pipenv. Certainly Hatch (and Poetry, and PDM) can do more for you than Flit. In particular, all of those tools include functionality to manage an environment associated with your project; Flit leaves that up to you to manage separately. Is there any remaining reason to use Flit? Perhaps not. 🙂 My best argument would be that for a certain type of simple packaging, Flit is a very simple, boring implementation, with no extra pieces. E.g. if you already manage development environments with virtualenv or conda and want to keep doing that, Flit will never try to create & manage a new environment for you. That's probably a fairly niche requirement, though. 🤷 |
Hello!
No, just chosen ahead of others as the default.
Yes, most notably plugins. This is by design as Flit wants to be minimal.
For libraries fundamental to the packaging ecosystem like packaging that require a build backend with vendored, or zero, dependencies. |
@takluyver @ofek Thank you both for chiming in; much appreciated! |
I could have also asked this in pypa/hatch, but given my question stems from an opinionated PR by the maintainer of Hatch, I thought this would get more new information.
I've used Flit on several projects previously, after I first saw it used in https://github.com/tiangolo/typer. Earlier today, I was poking around in https://tiangolo/fastapi, when I noticed that they had migrated to Hatch, and then I saw the changes in tiangolo/fastapi#5240. This PR is worded in a way that makes it seem like PyPA's official recommendation is to use Hatch, and that it provides a lot of advantages over Flit.
The text was updated successfully, but these errors were encountered: