enum-compat
enum/enum34 compatibility package
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-compatuv
uv add enum-compatpoetry
poetry add enum-compatInstalling 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
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
enum34Provides enumeration support for older Python…
permissive · top 5,000 on PyPI
types-enum34Provides type stubs for the enum34 package,…
permissive · top 15,000 on PyPI
backports.strenumProvides StrEnum, a string-based enumeration…
permissive · top 5,000 on PyPI
conditionalConditionally apply a context manager to a code…
permissive · top 15,000 on PyPI
futureProvides Python 3 syntax and semantics on…
permissive · top 1,000 on PyPI
parse-typeExtends the parse module with type converters…
permissive · top 5,000 on PyPI
qualnameProvides a `qualname()` function that emulates…
permissive · top 15,000 on PyPI
iso4217Provides ISO 4217 currency data as a Python…
permissive · top 15,000 on PyPI
legacy-cgiProvides the cgi and cgitb modules removed from…
permissive · top 5,000 on PyPI
omnibase-compatProvides shared structural types—enums, DTOs,…
unclear · top 15,000 on PyPI