$npx skillfedfor your agent

contextvars

PEP 567 Backport

SkipPyPI Software DevelopmentReleased Apr 20191.4M downloads / moApache License, Version 2.0Source build

Decision gist · record as of 2026-08-14

sdist only — contextvars-2.4.tar.gz · builds from source
v2.4 · released 2019-04-01

No. If you are on Python 3.7 or later, use the standard library contextvars. If you must support Python 3.6, this backport is your only option, but the lack of maintenance since 2019-04-01 and high install friction make it a last resort. Modern projects should not depend on this.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Python 3.6 only; Python 3.7+ includes contextvars in the standard library and will use that instead of this backport.
  • High install friction due to source distribution.
  • Package is abandoned as of 2019 with no maintenance since its last release.

License · maintenance · safety

Apache License, Version 2.0 (permissive) — Licensed under Apache License, Version 2.0 (permissive). No restrictions on commercial or private use; attribution required.

last release 2019-04-01 (2692 days) · last repo commit 2019-04-01 · 90 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,399,193 downloads/mo, #3,954 on PyPI

Verify before relying

pip install contextvars

import contextvars

my_var = contextvars.ContextVar('my_var')
my_var.set('value')
  • Whether asyncio event loop support was ever added after the 2019 release note stating it was not yet available.
  • Compatibility with Python 3.5 (listed in classifiers) despite the description stating Python 3.6 support.
  • Current status of Python 3.6 support lifecycle and whether this backport remains usable.
Same gist for agents: .md · .json

What it is and what it does

This package backports Python 3.7's contextvars module to Python 3.6, implementing PEP 567 context-local state. It allows you to create and manage context variables that maintain separate values across concurrent execution contexts—useful in async code and thread pools where thread-local storage is insufficient.

The package is now largely obsolete: Python 3.7+ includes contextvars in the standard library, and the package itself has been abandoned since its last release on 2019-04-01 with no active maintenance. It exists primarily as a compatibility shim for legacy Python 3.6 codebases. The standard library always takes precedence, so listing it as a dependency is safe but unnecessary for modern projects.

Use it for

  • Maintaining request-scoped state in async frameworks running on Python 3.6.
  • Passing context through concurrent.futures thread pools without global variables.
  • Porting code that uses contextvars from Python 3.7+ down to Python 3.6 environments.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

If you are on Python 3.7 or later, use the standard library contextvars. If you must support Python 3.6, this backport is your only option, but the lack of maintenance since 2019-04-01 and high install friction make it a last resort. Modern projects should not depend on this.

Install

contextvars on PyPI

Before you install

High install friction due to source distribution. Package is abandoned as of 2019 with no maintenance since its last release. Modern Python versions include contextvars in the standard library, making this backport obsolete for most use cases.

Python 3.6 only; Python 3.7+ includes contextvars in the standard library and will use that instead of this backport.

License in practice

Licensed under Apache License, Version 2.0 (permissive). No restrictions on commercial or private use; attribution required.

Quickstart

pip install contextvars

import contextvars

my_var = contextvars.ContextVar('my_var')
my_var.set('value')

Verify before relying

  • Whether asyncio event loop support was ever added after the 2019 release note stating it was not yet available.
  • Compatibility with Python 3.5 (listed in classifiers) despite the description stating Python 3.6 support.
  • Current status of Python 3.6 support lifecycle and whether this backport remains usable.

Package facts

LicenseApache License, Version 2.0 permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceAbandoned 2,692 days since the last release
Last repo commit
First released
Downloads1,399,193 / month, #3,954 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6

Evidence: contextvars-2.4.tar.gz

Tags

Capabilities
context variables python 3.6PEP 567 backportcontextvars backportcontext-local state managementasync context variablesthread-local alternatives
Topics
backportdeprecatedpython-3.6-only

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “context variables python 3.6”

  • contextvarsProvides the PEP 567 contextvars module for Python 3.6, enabling…
  • aiocontextvarsProvides asyncio support for the contextvars backport library on…
  • jinja2-simple-tagsProvides base classes to create custom Jinja2 template tags…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also aiocontextvars · opencensus-context · types-contextvars · pickle5 · backports.zoneinfo · futures · dataclasses · eval-type-backport · asyncio · contextlib2