Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🔧 Update package metadata, drop support for Python 3.6, move build internals from Flit to Hatch#5240

Merged
tiangolo merged 9 commits intofastapi:masterfrom
ofek:modernize-metadata
Sep 14, 2022
Merged

🔧 Update package metadata, drop support for Python 3.6, move build internals from Flit to Hatch#5240
tiangolo merged 9 commits intofastapi:masterfrom
ofek:modernize-metadata

Conversation

@ofek
Copy link
Contributor

@ofekofek commentedAug 7, 2022

Background

Hello there! The Python packaging ecosystem has standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631).

So, I'm spending my free time updating important projects so that they are modernized and set an example for others 😄

The is a follow-up topydantic/pydantic#4282

Summary of changes

Metadata

This implementsPEP 621 and removes Flit as a development dependency, allowingpip to be used directly which simplifies the contributing workflow and CI/CD. The build backendhatchling (of which I am a maintainer in thePyPA) is now used as that is the default in the officialPython packaging tutorial. Hatchling is available on all the major distribution channels such asDebian,Fedora,Arch Linux,conda-forge,Nixpkgs,Alpine Linux,FreeBSD,Gentoo Linux,MacPorts,OpenEmbedded,Spack, etc.

Python support

The earliest supported Python 3 version of Hatchling is 3.7, therefore I've also set that as the minimum here. Python 3.6 is EOL and other build backends likeflit-core andsetuptools also dropped support. Python 3.6 accounts for 3-4% of downloads in the last month:https://pypistats.org/packages/fastapi

If support is still desired for some reason, I can keep the existing cap and only require 3.7+ in CI/CD.

Documentation

I updated the contributing docs, which accounts for most of the diff. Luckily, they were written in such a way that going fromflit topip didn't alter semantics for any language!

Future

  • We now have the ability to ship optional wheels compiled with Mypyc, as Blackrecently did, to be even faster inbenchmarks. Though as@tiangolo mentioned offline, it may be best to wait for the great work@samuelcolvin is doing on Pydantic v2 to be over to be sure we don't cause any disruptions in their test suite.
  • We could source the version from Git

iudeen, tiangolo, thomasleveil, bikashkarmokar, vincentsarago, j08lue, br3ndonland, and cholden-ag reacted with heart emojitiangolo reacted with rocket emoji
@codecov
Copy link

codecovbot commentedAug 7, 2022
edited
Loading

Codecov Report

Merging#5240 (90950e3) intomaster (b2aa359) willnot change coverage.
The diff coverage is100.00%.

@@            Coverage Diff            @@##            master     #5240   +/-   ##=========================================  Coverage   100.00%   100.00%           =========================================  Files          540       540             Lines        13951     13947    -4     =========================================- Hits         13951     13947    -4
Impacted FilesCoverage Δ
fastapi/encoders.py100.00% <ø> (ø)
fastapi/concurrency.py100.00% <100.00%> (ø)
fastapi/dependencies/utils.py100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here.

@github-actions
Copy link
Contributor

📝 Docs preview for commit0c10260 at:https://62ef63a1ba5a2255983c34e7--fastapi.netlify.app

@ofek
Copy link
ContributorAuthor

ofek commentedAug 7, 2022

Ah looks like the 3.6 job is hard coded in this repo's GitHub settings as required.

@github-actions
Copy link
Contributor

📝 Docs preview for commit8ed4d8a at:https://62fdccd962cae252d9a65fc8--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commitab290a9 at:https://62fdd03bc009ce60bf4787ee--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commit8ee7c5e at:https://632218ad6f7e673abce043d5--fastapi.netlify.app

FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
run: bash scripts/publish.sh
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Suggested change
with:
with:
user:__token__

Copy link
Member

Choose a reason for hiding this comment

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

Is it needed? Then maybe the docs in the GitHub Action need an update too?

https://github.com/pypa/gh-action-pypi-publish#usage

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ah, guess not!

@github-actions
Copy link
Contributor

📝 Docs preview for commitc52e2ee at:https://63221a832b16da3418038c4d--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commit90950e3 at:https://63221be7afbe8635f3f1102d--fastapi.netlify.app

@tiangolotiangolo changed the titleUpdate package metadata🔧 Update package metadata, adopt Hatch instead of Flit, drop support for Python 3.6Sep 14, 2022
@tiangolotiangolo changed the title🔧 Update package metadata, adopt Hatch instead of Flit, drop support for Python 3.6🔧 Update package metadata, drop support for Python 3.6, move build internals from Flit to HatchSep 14, 2022
@tiangolo
Copy link
Member

Awesome job, thanks a lot@ofek! FastAPI is now built with Hatch. 🥚 🐍 😎

Also, Python 3.6 is now officiallyNOT supported. 🔥

ofek, iudeen, and seandlg reacted with heart emoji

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

Reviewers

@tiangolotiangolotiangolo left review comments

@samuelcolvinsamuelcolvinsamuelcolvin left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@ofek@tiangolo@samuelcolvin

Comments


[8]ページ先頭

©2009-2026 Movatter.jp