skillfed

enum-compat

enum/enum34 compatibility package

enum-compat v0.0.3 7.9M downloads/30d#1,686 on PyPI4
Permissive license MIT Abandoned released

What it is and what it does

enum-compat is a virtual package designed to conditionally install enum34 on Python versions older than 3.4, where the enum module was not yet part of the standard library. On Python 3.4 and later, the package does nothing—it is a no-op that allows a single dependency declaration to work across multiple Python versions.

The package's own documentation explicitly recommends against using it, suggesting instead that you directly declare `'enum34; python_version < "3.4"'` as a conditional dependency in your own code. This is a legacy tool whose primary value is historical: it was useful when Python 2.6, 2.7, and early 3.x versions were still in active use, but those versions are now end-of-life and the package itself has not been maintained since 2019-10-14.

Use it for:

  • Maintaining legacy Python 2.6 or 2.7 codebases that need enum support without explicit version-gated dependencies
  • Bridging older projects to Python 3.3 where enum was not yet standard
  • Simplifying dependency declarations in projects that must support a wide range of Python versions

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Conditionally installs enum34 on Python versions older than 3.4; on Python 3.4+ it is a no-op.

No. The package is abandoned, unmaintained since 2019-10-14, and its own documentation recommends against using it in favor of direct conditional dependency syntax. Modern Python versions have enum built-in, and Python 2.x is end-of-life. If you are supporting legacy Python, use conditional dependencies directly in your project's requirements rather than this shim.

Install

enum-compat on PyPI

pip

pip install enum-compat

uv

uv add enum-compat

poetry

poetry add enum-compat

Installing enum-compat

Before you install

Installation is frictionless with no runtime dependencies, but the package has been abandoned since 2019-10-14 and has received no updates in 2496 days. It is only relevant for Python versions that are themselves end-of-life.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions.

Quickstart

# In requirements.txt or setup.py:
# enum-compat  # or use the recommended approach:
# enum34; python_version < "3.4"

import enum
Color = enum.Enum('Color', 'RED GREEN BLUE')

Only useful on Python versions older than 3.4; on Python 3.4+ it has no effect. Python 2.6, 2.7, and 3.3 are end-of-life.

Verify before relying

  • Whether enum34 itself remains safe and maintained for legacy Python environments
  • Current compatibility with modern Python tooling and dependency resolvers
  • Whether any security issues exist in enum34 that would affect users of this package

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,496 days since the last release
Last repo commit
First released
Downloads 7,856,661/month — #1,686 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: enum_compat-0.0.3-py3-none-any.whl

Keywords: enum

Intended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Software Development :: Libraries

Tags

enum compatibility python 2enum34 backportpython 2.7 enum supportconditional enum dependencylegacy python enum
legacyabandoned

More Libraries packages