NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #801 most downloaded on PyPI
Distribution-building parts of Flit. See flit package for more information
Latest stable
4.2.0
Last release 26 days ago
27 Oct 2026
Release timing varies
gaps range from 5 weeks to 1.5 years
Nearly every release is documented
notes for 24 of 26 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
29 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Flit now has a policy against using AI/LLMs for development.
Flit now has a policy against using AI/LLMs for development.
Sdist include & exclude patterns are now matched regardless of Unicode normalisation form. This fixes a potential security issue, where a sensitive file may be published in an sdist even though it appears to match an exclusion rule. This may also depend on the filesystem, e.g. a rule that matches on Linux may not match on Mac, because Mac filesystems perform unicode normalisation.
If you have sensitive information in your project folder and you rely on include/exclude patterns to keep it out of sdists, it's still a good idea to check them carefully. A malicious contributor could still use other tricks, such as Unicode lookalike characters, to make a pattern that doesn't do what it appears to.
Flit will now refuse to build an sdist with symlinks that point outside of the project directory. This is a security issue for a consumer unpacking the sdist, and the consumer still needs to verify it, but this makes it harder to accidentally produce an sdist which consumers will reject.
Similarly, Flit will refuse to build wheels with symlinks pointing outside of the project directory, or using a README from outside the project directory. Either of these routes could previously have included files from the build machine into a wheel.
This change does not make it safe to build arbitrary untrusted packages with Flit; code from the package may still be executed. The aim is to make building more predictable, to reduce what needs to be manually verified. If you do not trust the source of a package, it is best to only attempt to build it in a secure sandbox with no access to sensitive information.
Allow environment markers to start with a parenthesised clause (836).
Text in [] brackets in requirements should only be name normalised if it is the name of an extra group (834).
Allow uploading to PyPI with a configured URL missing the trailing slash (829).
Fix flit install --symlink installing into a directory with spaces in the path (835).
Improved error messages for various cases, including hiding tracebacks in more cases where they are not informative (832, 833, 832, 840, 841)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
License expressions with named exceptions, the WITH syntax, are accepted (809).
License expressions with named exceptions, the WITH syntax, are accepted (809).
flit init allows dotted module names, for a component of a namespace package (822).
Fix line endings in .cmd script wrappers on Windows (824).
Fix invalid metadata files with Import-Name (813).
Fix invalid metadata files with Import-Name (813).
No changes, but a new tag to trigger an upload to PyPI now that twine will accept it.
No changes, but a new tag to trigger an upload to PyPI now that twine will accept it.
Support for license expressions using the AND and OR operators (731).
Support for license expressions using the AND and OR operators (731).
Recognise __version__: str = "0.1" annotated assignments when finding the version number (728).
Clear error message when referring to a license file in a parent directory, which is not supported (725).
Support for SPDX license expressions and multiple license files, as detailed in 639::
Support for SPDX license expressions and multiple license files, as detailed in 639:
license = "BSD-3-Clause" license-files = ["LICENSE"]
For now, only a single license identifier is allowed. More complex expressions describing multiple licenses & expressions may be supported in a future version.
The metadata format in produced packages is now version 2.4, to support the expanded license information.
Bump version: 3.10.0 → 3.10.1
Bump version: 3.10.0 → 3.10.1
The sdist of flit_core now includes the corresponding tests (704). These were missing in 3.10.
Avoid using the deprecated datetime.utcfromtimestamp() (682).
flit publish can now use PyPI tokens stored in keyring (649), either project tokens with a 'username' like pypi_token:project:{project_name} (use the normalised form of the name) or user tokens (pypi_token:user:{username}).
The --python option can now take the path of a virtualenv folder, as an alternative to a Python executable (667).
Flit will work with current development versions of Python again (684).
The flit command line package now requires Python 3.8 or above (660). flit_core still works with Python 3.6 or above.
The metadata in packages now has the names of optional dependency groups ("extras") normalised, complying with version 2.3 of the metadata standard (676, 697).
The flit command line package now depends on pip (647).
Fix potential substitution of environment variables into passwords read from .pypirc files (652).
A warning is now shown when building packages which specify the old flit.buildapi backend, which should be replaced by flit_core.buildapi (674). It's a good idea to always set a maximum version for the build requirement, to protect against changes in future major versions of Flit.
Avoid using the deprecated datetime.utcfromtimestamp() (682).
Flit now has a SECURITY.md file in the GitHub repository (665).
The tests for flit_core are no longer part of the installed package, reducing the size of the wheels (691).
Bump version: 3.8.0 → 3.9.0
Bump version: 3.8.0 → 3.9.0
New options flit build --use-vcs and flit build --no-use-vcs to enable & disable including all committed files in the sdist. For now --use-vcs is the default, but this is likely to change in a future version, to bring flit build in line with standard build frontends like python -m build (625).
Sdist file names, and the name of the top-level folder in an sdist, are now normalised, in accordance with 625 (628).
A statically defined version number can now be parsed from files called version.py, _version.py or __version__.py inside a package, as well as from __init__.py, so executing code is required in fewer cases (630).
Fix setting the flag for regular files in zip metadata (639).
The timestamp embedded in the gzip wrapper for sdists now defaults to a fixed date, so building an sdist twice on the same machine should produce identical results, even without any special steps (635). Setting SOURCE_DATE_EPOCH is still recommended for properly reproducible builds.
Bump version: 3.7.1 → 3.8.0
Bump version: 3.7.1 → 3.8.0
A project name containing hyphens is now automatically translated to use underscores for the import name (566).
New option flit install --only-deps to install the dependencies of the package, but not the package itself.
Add support for recursive globbing (**) in sdist includes and excludes (550).
Python's bytecode cache files (__pycache__ folders and .pyc files) are now always excluded from sdists (581).
Use tomllib in Python 3.11, rather than tomli (573, 604).
Fix crash when unable to get a password from keyring (567).
Fix including modified files in sdist when using Mercurial (541).
Fix for some cases of determining whether a package supports Python 2 or not (593).
Fix parsing version number from code using multiple assignments (474).
Document how to use a PyPI token with FLIT_PASSWORD (602).
Fix link to information about environment variables for pip (576).
Link to the docs for the latest stable version in package metadata (589).
Remove a mention of the toml package, which is no longer needed, from the development page (601).
The bootstrap install script for flit_core accepts a new --install-root option.
Ensure the license file is included in packages on PyPI (603).
Bump version: 3.7.0 → 3.7.1
Bump version: 3.7.0 → 3.7.1
Fix building packages which need execution to get the version number, and have a relative import in __init__.py (531).
Use newer importlib APIs, fixing some deprecation warnings (499).
Support for external data files such as man pages or Jupyter extension support files (510).
Project names are now lowercase in wheel filenames and .dist-info folder names, in line with the specifications (498).
Improved support for bootstrapping a Python environment, e.g. for downstream packagers (511). flit_core.wheel is usable with python -m to create wheels before the build tool is available, and flit_core sdists also include a script to install itself from a wheel before installer is available.
Use newer importlib APIs, fixing some deprecation warnings (499).
flit_core now bundles the tomli _ TOML parser library (version 1.2.3) to avoid a circular dependency between flit_core and tomli (492). This means fli
flit_core now bundles the tomli TOML parser library (version 1.2.3) to avoid a circular dependency between flit_core and tomli (492). This means flit_core now has no dependencies except Python itself, both at build time and at runtime, simplifying bootstrapping.
Fix development installs with flit install --symlink and --pth-file, which were broken in 3.5.0, especially for packages using a src folder (472).
Fix development installs with flit install --symlink and --pth-file, which were broken in 3.5.0, especially for packages using a src folder (472).
You can now use Flit to distribute a module or package inside a namespace package (as defined by 420). To do this, specify the import name of the conc
You can now use Flit to distribute a module or package inside a namespace package (as defined by 420). To do this, specify the import name of the concrete, inner module you are packaging - e.g. name = "sphinxcontrib.foo" - either in the [project] table, or under [tool.flit.module] if you want to use a different name on PyPI (468).
Flit no longer generates a setup.py file in sdists (.tar.gz packages) by default (462). Modern packaging tools don't need this. You can use the --setup-py flag to keep adding it for now, but this will probably be removed at some point in the future.
Fixed how flit init handles authors' names with non-ASCII characters (460).
When flit init generates a LICENSE file, the new pyproject.toml now references it (467).
Python 3.6 or above is now required, both for flit and flit_core.
Python 3.6 or above is now required, both for flit and flit_core.
Add a --setup-py option to flit build and flit publish, and a warning when neither this nor --no-setup-py are specified (431). A future version will stop generating setup.py files in sdists by default.
Add support for standardised editable installs - pip install -e - according to 660 (400).
Add a --pypirc option for flit publish to specify an alternative path to a .pypirc config file describing package indexes (434).
Fix installing dependencies specified in a [project] table (433).
Fix building wheels when SOURCE_DATE_EPOCH (see reproducible) is set to a date before 1980 (448).
Switch to using the tomli TOML parser, in common with other packaging projects (438). This supports TOML version 1.0.
Add a document on bootstrap (441).
PKG-INFO files in sdists are now generated the same way as METADATA in wheels, fixing some issues with sdists (410).
PKG-INFO files in sdists are now generated the same way as METADATA in wheels, fixing some issues with sdists (410).
flit publish now sends SHA-256 hashes, fixing uploads to GitLab package repositories (416).
The [project] metadata table from 621 is now fully supported and documented. Projects using this can now specify requires = ["flit_core >=3.2,<4"] in the [build-system] table.
Experimental support for specifying metadata in a [project] table in pyproject.toml as specified by 621 (393). If you try using this, please specify r
Experimental support for specifying metadata in a [project] table in pyproject.toml as specified by 621 (393). If you try using this, please specify requires = ["flit_core >=3.2.0,<3.3"] in the [build-system] table for now, in case it needs to change for the next release.
Fix writing METADATA file with multi-line information in certain fields such as Author (402).
Fix building wheel when a directory such as LICENSES appears in the project root directory (401).
Switch from the deprecated pytoml package to toml (378).
Update handling of names & version numbers in wheel filenames and .dist-info folders in line with changes in the specs (395).
Switch from the deprecated pytoml package to toml (378).
Fix specifying backend-path in pyproject.toml for flit-core (as a list instead of a string).
The deprecated flit installfrom command was removed (334). You can use pip install git+https://github.com/... instead.
Breaking changes:
Projects must now provide Flit with information in pyproject.toml files, not the older flit.ini format (338).
flit_core once again requires Python 3 (>=3.4). Packages that support Python 2 can still be built by flit_core 2.x, but can't rely on new features (342).
The deprecated flit installfrom command was removed (334). You can use pip install git+https://github.com/... instead.
Features and fixes:
Fix building sdists from a git repository with non-ASCII characters in filenames (346).
Fix identifying the version number when the code contains a subscript assignment before __version__ = (348).
Script entry points can now use a class method (359).
Set suitable permission bits on metadata files in wheels (256).
Fixed line endings in the RECORD file when installing on Windows (368).
Support for recording the source of local installations, as in 610 (335).
flit init will check for a README in the root of the project and automatically set it as description-file (337).
Pygments is not required for checking reStructuredText READMEs (357).
Packages where the version number can be recognised without executing their code don't need their dependencies installed to build, which should make them build faster (361).
Ensure the installed RECORD file is predictably ordered (366).
Fix specifying --repository before upload (322). Passing the option like this is deprecated, and you should now pass it after upload.
New projects created with init_cmd now declare that they require flit_core >=2,<4 (328). Any projects using pyproject.toml (not flit.ini) should be compatible with flit 3.x.
Fix selecting files from a git submodule to include in an sdist (324).
Fix checking classifiers when no writeable cache directory is available (319).
Better errors when trying to install to a mis-spelled or missing Python interpreter (331).
Fix specifying --repository before upload (322). Passing the option like this is deprecated, and you should now pass it after upload.
Documentation improvements (327, 318, 314)
Allow underscores in package names with Python 2 (305).
Allow underscores in package names with Python 2 (305).
Add a --no-setup-py option to build sdists without a backwards-compatible setup.py file (311).
Fix the generated setup.py file for packages using a src/ layout (303).
Fix detecting when more than one file matches the module name specified (307).
Fix installing to a venv on Windows with the --python option (300).
Don't echo the command in scripts installed with --symlink or --pth-file on Windows (310).
New bootstrap_dev.py script to set up a development installation of Flit from the repository (301, 306).
Use compression when adding files to wheels.
Use compression when adding files to wheels.
Added the FLIT_INSTALL_PYTHON environment variable (295), to configure flit to always install into a Python other than the one it's running on.
flit_core uses the intreehooks shim package to load its bootstrapping backend, until a released version of pip supports the standard backend-path mechanism.
Nothing published for this version
Nothing published for this version
Flit 2 is a major architecture change. The flit_core package now provides a 517 backend for building packages, while flit is a command line interface
Flit 2 is a major architecture change. The flit_core package now provides a 517 backend for building packages, while flit is a command line interface extending that.
The build backend works on Python 2, so tools like pip should be able to install packages built with flit from source on Python 2. The flit command requires Python 3.5 or above. You will need to change the build-system table in your pyproject.toml file to look like this:
[build-system]
requires = ["flit_core >=2,<4"]
build-backend = "flit_core.buildapi"
Other changes include:
Support for storing your code under a src/ folder (260). You don't need to change any configuration if you do this.
Options to control what files are included in an sdist - see pyproject_toml_sdist for the details.
Requirements can specify a URL 'direct reference', as an alternative to a version number, with the syntax defined in 440: requests @ https://example.com/requests-2.22.0.tar.gz.
Fix the shebang of scripts installed with the --python option and the --symlink flag (286).
Installing with --deps develop now installs normal dependencies as well as development dependencies.
Author email is no longer required in the metadata table (289).
More error messages are now shown without a traceback (254)
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.