Skip to content

Conversation

@webknjaz
Copy link
Contributor

This is another modern build backend. The patch deletes setup.py from the repository, and adds configuration for hatchling and declares PEP 621 metadata in pyproject.toml.

It does not attempt to change the previously existing behavior.

Put an x into the box if that apply:

  • This PR introduces breaking change.
  • This PR fixes a bug.
  • This PR adds new functionality.
  • This PR enhances existing functionality.

Description of your changes

$sbj.

How can we test changes

python -Im build

This is another modern build backend. The patch deletes `setup.py`
from the repository, and adds configuration for `hatchling` and
declares PEP 621 metadata in `pyproject.toml`.

It does not attempt to change the previously existing behavior.
@webknjaz webknjaz changed the title 📦 Migrate from setuptools to hatchling chore(packaging): 📦 Migrate from setuptools to hatchling Dec 28, 2024
@webknjaz webknjaz changed the title chore(packaging): 📦 Migrate from setuptools to hatchling chore(packaging): X📦 Migrate from setuptools to hatchling Dec 28, 2024
Comment on lines +26 to +28
[[project.authors]]
name = 'Contributors' # FIXME
# email = 'степан@криївка.укр'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну не Гіга і на тому спасибі :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Та тут просто взагалі трохи дивне значення в оригіналі. Потім треба нормально заповнити authors/maintainers. Але я не хотів цим займатися зараз, лише дуже мінімальна міграція.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's stick with ASCII please since it's not all of the pre-commit-terraform users who can read non-English.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a code comment. Someone should change it to real values.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a code comment that is unreadable by English-only users. Most of the time it's just a garbage symbols for them, you know.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone should change it to real values.

Until then, it's best to replace with ASCII chars or remove. It's just an opinion of mine though. I'll deffer this to @MaxymVlasov as main collaborator.

@MaxymVlasov MaxymVlasov changed the title chore(packaging): X📦 Migrate from setuptools to hatchling chore(packaging): Migrate from setuptools to hatchling Dec 28, 2024
@MaxymVlasov MaxymVlasov merged commit d87bf02 into antonbabenko:master Dec 28, 2024
6 of 8 checks passed
@yermulnik
Copy link
Collaborator

@webknjaz @MaxymVlasov Would it make sense 1) to add a brief outline to this PR description of what is changing for end users (if any), what benefits this change adds to pre-commit-terraform overall and 2) to add a brief about to README (if applicable)? 🤔
I mean that «This is another modern build backend» is kinda pretty much concise and doesn't explain why.
Thanks.

@MaxymVlasov
Copy link
Collaborator

  1. No changes to end users
  2. No xhanges in Readme required

This actually affects only how hooks written on python discovered by other python tools (in our case pre-commit itself)

Currently there only 1 python hook - terraform_docs_replace, deprecated for years.
So, TL;DR: it shoudn't affect anything, but if so, only deprecated and marked for removal long time ago hook could be broken

@webknjaz
Copy link
Contributor Author

We talked about it privately so some context might be missing. But essentially nothing changes for anyone really.
It's an internal implementation detail and only changes what pip install . calls under the hood.
Just treat it as making dynamic packaging declaration static through declarative configs.

@yermulnik
Copy link
Collaborator

@webknjaz @MaxymVlasov Thanks for details and context. Let's anyways add details in PRs description so that other contributors have an idea on the context of private discussions 🤝

@MaxymVlasov
Copy link
Collaborator

MaxymVlasov commented Dec 28, 2024

About benefits @webknjaz can provide better info, but AFAIK, setup.py in this repo actually configured in wrong way from day 1

And this PR with bunch of others, make python hooks more isolated and predictable during direct calls to hooks via test execution, for instance.

And just get rid of of legacy stuff which just don't work

@yermulnik
Copy link
Collaborator

yermulnik commented Dec 28, 2024

About benefits @webknjaz can provide better info, but AFAIK, setup.py in this repo actually configured in wrong way from day 1

And this PR with bunch of others, make python hooks more isolated and predictable during direct calls to hooks via test execution, for instance.

And just get rid of of legacy stuff which just don't work

Yep-yep, already got the idea =) My point is to share context within PR description when PR is created =)

@webknjaz
Copy link
Contributor Author

@yermulnik I'll try adding more context in general. It's just that Max asked for help, which lead to me discovering a number of typical structural and infra problems in the repo. So I wanted to make a few small PRs to address that but I don't have a lot of time to dedicate to this.

@yermulnik
Copy link
Collaborator

@yermulnik I'll try adding more context in general.

Appreciate it 🤝

It's just that Max asked for help, […] but I don't have a lot of time to dedicate to this.

Didn't want to add burden for you. Just am carrying about future reference and posterity.
Where you see a concise description as a bit of overhead, I'm all fine with something like «Discussed with @MaxymVlasov , blame that guy if anything» 😂

@antonbabenko
Copy link
Owner

This PR is included in version 1.97.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants