skillfed

flake8-polyfill

Polyfill package for Flake8 plugins

flake8-polyfill v1.0.2 894.3K downloads/30d#4,793 on PyPI
Permissive license MIT Abandoned released

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-polyfill

uv

uv add flake8-polyfill

poetry

poetry add flake8-polyfill

Installing 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

Environment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Tags

flake8 plugin compatibilityflake8 2.x 3.x supportflake8 polyfill helpersflake8 option handlingflake8 version compatibilityflake8 stdin monkey patchflake8 cross-version support
flake8-plugincompatibility-layer

More Python Modules packages