-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Get rid of hatchling
and return back to setuptools
#349
Comments
Well, this is of course debatable, but IMHO PEP 517 was not a mistake, because standards are better than a single implementation that encapsulates all the details of a specific operation. There is nothing wrong with multiple implementations of the same thing as long as everyone adheres to some API / standard. It's like there are multiple clients and servers that exist for HTTP but they are all "speaking" the same protocol. Or like Python has multiple implementations but they are all implementing the same language. Having only setuptools was a problem that manifested in multiple ways - if you remember the days of "easy_install" and "egg"s. Every time a standard needed to be set. I was skeptical about Regarding "requiring no additional dependencies" - this is not a runtime dependency but a build time dependency, so it is not a real problem. Note that we aren't using the entire I am not familiar with |
Sure, but PEP 517 is used to require an exact implementation, not any implementation supporrting the standard. PEP 621 even have not been created when PEP 517 has been issued. And even now PEP 621 doesn't cover several important aspects, so each tool uses an own section in IMHO the more sound approach would have been to develop a standard first and only then encourage third-party impls, and do it the way that a user can use any impl following the standard.
I have never used them in my projects. Well, eggs were used somehow, but not in form of packages, but I remember that some URIs used to get packages directly from GitHub contained the part with the name
For me it is a problem. My CI pipelines install most of the deps from sources. And fetching anything from But build systems are different beasts and have to be handled separately. I always install
I have not used
|
It is also documented here.
Can you pleas explain why / where it is installed anyway? Does it come installed by default in Linux distributions, or comes with Python installations? As far as I know I don't have it installed on my development machine currently.
colorama is only using one build system, and since I am not thoroughly familiar with all the options, I don't have enough information to decide what makes a build system "good" or better than an alternative. Switching
I see. So you're saying the build backend should be flit_core? Can you give an example of how to configure pyproject.toml to use flit? |
To enumerate, Hatchling is everywhere:
Please tell me where it isn't and I will resolve it promptly. |
No, @wiggin15 is correct here: any implementation supporting the standard is equally valid. |
It seems they have broken it again:
I'm sorry, I have no time right now to investigate why that has got broken.
Some essential packages like
AFAIK no, but
Yes, it's true. But the benefit is: less packages to be installed. In fact I'd have preferred
https://github.com/pypa/pep517/blob/main/pyproject.toml |
Can you explain the issue you or your company is experiencing adding Hatchling to builds? |
The issue is: I have to install yet another python package. It is a burden in multiple ways.
I see nothing wrong in your tool (I have not analysed it). What is wrong, is that it is a yet another tool doing the same thing I don't want your |
Less so than setuptools as the codebase is an order of magnitude smaller and thus more auditable.
So is any non-build dependency. Should projects just never add new deps in your ideal packaging ecosystem?
This sounds like a problem specific to you. Many companies have and are switching without issue.
That is the nature of dependencies and has nothing to do with this discussion. FYI Hatch will drop support for Python versions on the same day they reach EOL.
That indicates to me that you haven't made any attempt at all to learn the benefits/differences and why people are switching.
I want to improve Python packaging. Would you say Chrome improved the web browser space at all, or only fragmented it to everyone's detriment?
Sometimes that's untenable, please read https://peps.python.org/pep-0517/#abstract
Great, but others do. |
That's true. But
Every use of every dependency should be justified. Benefits should outweight drawbacks in order for it to be justified. I don't see that depending on your tool is justified: we can do the same (build a wheel from a cloned git repo) using the packages that though are not part of the standard library of CPython, but that can still be considered a part of the language and present on every machine where building of python packages is done.
I don't care, 2BH. I only need it to build wheels. Every additional benefits are too minor to justify depending on it. Yes, your tool is faster than
Yes, it's true.
It is a problem. CPython drops python versions too fast. I still use 3.4 on some Windows XP machines (
I have read that. I consider
a feature, not a bug, because it forced everyone to use |
Can you maybe express your frustration on a different tracker? I don't want to bother the maintainers here. Feel free to email me too! |
I can relate with the frustration of having to fix broken pipelines because of changes in dependencies, and having to support different packages with their unique sets of dependencies. However, if I understand the issue correctly, this is an edge case that is specific to this pipeline. Another user might have their pipeline configured to install hatchling for something else, but not flit-core, and then we'll have the same problem in the opposite direction. It looks like this is about an opinion on PEP 517 and its different implementations more than it is about colorama. Right now I'm not convinced there is a need for a change in colorama so I'm closing this. |
In PR #338 setuptools was replaced by
hatchling
by its maintainer, who obviously has conflict of interest between promoting his software and doing the best for this project as a contributor. The PR was sent 2022-03-27,setuptools
61.2.0 with usable support ofPEP 621
was released the same day (setuptools
has started supporting PEP 621 in61.0.0
released on 2022-03-24, but there were issues, so I usually set>=61.2
in my projects).We need:
setuptools
is the de-facto standard and so should be already installed. I think we should replacehatchling
withsetuptools
. Ifsetuptools
seems to be too heavy, the next alternative isflit
. All of them support PEP 621, so the changes in thepyproject.toml
should be minimal.And yet another opinion: PEP 517 was a big mistake because instead of one single build system (
setuptools
) we now have to install a whole zoo of build systems (flit_core
,poetry_core
has long become a mandatory minimum with its own very loyal adepts (worth noting:flit
really works much faster thansetuptools
, so usingflit
may be justified in some cases), and nowhatchling
andmaturin
(an extremily heavy build system written in Rust, even thoughsetuptools-rust
plugin exists for this purpose) seems to be added to it) doing the same things but created and promoted out of "not-invented-here" syndrome.The text was updated successfully, but these errors were encountered: