flake8-polyfill
Polyfill package for Flake8 plugins
What it is and what it does
flake8-polyfill is a compatibility layer for developers writing Flake8 plugins that need to work across both Flake8 2.x and 3.x. It abstracts away API differences between those versions so plugin code can use a single interface. The package provides three main helpers: an options registration wrapper that handles parameter differences in add_option across versions, a stdin monkey-patching utility that works around changes in how Flake8 handles standard input caching, and a version comparison utility that normalizes version strings into tuples for easy conditional logic.
The package depends only on flake8 and installs with low friction. However, it has been abandoned since 2017-12-30 and receives no maintenance. It was designed for a specific compatibility problem between Flake8 2.x and 3.x. Installing this package makes sense only if you are actively maintaining a legacy plugin that must support both versions simultaneously, and you accept the risk of no future updates.
Use it for:
- Registering plugin options in a way that works identically on both Flake8 2.x and 3.x without conditional code branches.
- Ensuring stdin is properly cached and retrievable in plugins across Flake8 versions that handle it differently.
- Writing version-conditional logic in a plugin by comparing Flake8 version tuples instead of parsing version strings.
- Maintaining a legacy Flake8 plugin that must continue supporting older Flake8 2.x installations alongside newer 3.x ones.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides compatibility helpers for Flake8 plugins that need to support both Flake8 2.x and 3.x versions simultaneously.
No, unless you are maintaining a legacy Flake8 plugin that must support both 2.x and 3.x. The package is abandoned (last release 2017-12-30) and was designed to solve a compatibility problem between those versions. If you are writing a new plugin, use Flake8 3.x APIs directly. If you must support both versions, accept that this package will not receive updates for any future Flake8 changes.
Install
flake8-polyfill on PyPI
pip
pip install flake8-polyfilluv
uv add flake8-polyfillpoetry
poetry add flake8-polyfillInstalling flake8-polyfill
Before you install
Low install friction with a single runtime dependency on flake8. However, the package is abandoned—last release was 2017-12-30. Only consider installing if you are maintaining a Flake8 plugin that must support both 2.x and 3.x, and you accept the risk of no future maintenance.
License in practice
MIT license is permissive and poses no restrictions on use or redistribution.
Quickstart
pip install flake8-polyfill
from flake8_polyfill import options
class MyFlake8Plugin(object):
@classmethod
def add_options(cls, parser):
options.register(parser, '--my-option',
parse_from_config=True,
default='...',
help='...')
Requires flake8 to be installed; intended for use within Flake8 plugin development, not as a standalone tool.
Verify before relying
- Whether this package still works correctly with modern Flake8 versions beyond 3.x, given its abandoned status.
- Whether the monkey-patching approach for stdin handling remains compatible with current Python and Flake8 internals.
- How long the package has been without maintenance and whether Flake8 2.x support is still relevant.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | abandoned — 3,149 days since the last release |
| First released | |
| Downloads | 894,296/month — #4,793 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_polyfill-1.0.2-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
flake8-plugin-utilsProvides base classes and utilities for writing…
permissive · top 5,000 on PyPI
flake8-helperProvides utility functions and base classes to…
permissive · top 15,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8-tupleA flake8 plugin that detects unintended…
permissive · top 15,000 on PyPI
pytest-flake8A pytest plugin that runs flake8 PEP8…
permissive · top 15,000 on PyPI
flake8-deprecatedA flake8 plugin that detects calls to…
copyleft · top 15,000 on PyPI
flake8-blind-exceptA flake8 plugin that detects overly broad…
permissive · top 15,000 on PyPI
pep8-namingA flake8 plugin that checks Python code for…
permissive · top 5,000 on PyPI
pyproject-flake8Enables flake8 linting to read configuration…
unclear · top 15,000 on PyPI
verminVermin analyzes Python source code to detect…
permissive · top 15,000 on PyPI