httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Apply PEP-621

Open Kludex opened this issue 3 years ago • 8 comments

This was brought on https://github.com/encode/starlette/pull/1359.

setuptools released 0.61.0 yesterday, and brought to light the PEP-621 which makes this PR possible. Most of the PR was inspired on this page: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

Notes:

  • ~I'll continue later on. I need to check if everything is included on the metadata files.~

How to test?

  • ./scripts/build to see that wheel and tar.gz are generated
  • python -m pip install -e . for editable installs

Kludex avatar Mar 25 '22 05:03 Kludex

Oh... setuptools doesn't support Python 3.6 anymore.

Kludex avatar Mar 26 '22 18:03 Kludex

Discussion on dropping 3.6 support https://github.com/encode/httpx/discussions/2136

johtso avatar Mar 26 '22 18:03 johtso

What do we think about this bit at the top of the setuptools docs page…?

Note New in 61.0.0 (experimental)

Warning Support for declaring project metadata or configuring setuptools via pyproject.toml files is still experimental and might change (or be removed) in future releases.

Presumably the idea if we go with this, we'd switch all Encode projects over as well eventually. Is now a good time? Also, what does this get us compared to the current setup.py configuration?

florimondmanca avatar Mar 30 '22 19:03 florimondmanca

Is now a good time?

Maybe not. Let's wait for others to test this first 😅 👍

Also, what does this get us compared to the current setup.py configuration?

One less file (setup.py), and compliance with the mentioned PEP.

Kludex avatar Apr 05 '22 11:04 Kludex

For another point of comparison, I played with pyproject.toml-based packaging as well and here's what I came up with: https://github.com/florimondmanca/asgi-htmx/blob/master/pyproject.toml

florimondmanca avatar May 30 '22 14:05 florimondmanca

Thanks for the review @florimondmanca 🙇

I've updated the PR, sync with the changes that happened on setup.py, and I've added the setup.py back.

Kludex avatar Jul 01 '22 04:07 Kludex

It adds correctly the py.typed.

I've added the content-type on the readme and bumped twine, as I was having a warning.

Kludex avatar Jul 15 '22 07:07 Kludex

Let's wait for @tomchristie 's opinion here?

Kludex avatar Jul 15 '22 07:07 Kludex

  • Close this in favor of #2334

Kludex avatar Aug 15 '22 17:08 Kludex