Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
pythoncapi
cpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Commits
Breadcrumbs
History for
cpython
Doc
library
contextlib.rst
on
pythoncapi
User selector
All users
Datepicker
All time
Commit history
Commits on Aug 25, 2018
Fixed typo with asynccontextmanager code example (GH-8845)
Show description for 416cbce
alvassin
authored and
Mariatta
committed
416cbce
View commit details
Copy full SHA for 416cbce
View code at this point
Browse repository at this point
Commits on Jul 23, 2018
bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816)
Carreau
authored and
taleinat
committed
bde782b
View commit details
Copy full SHA for bde782b
View code at this point
Browse repository at this point
Commits on Jul 9, 2018
bpo-34067: Include a more easily understood example for nullcontext (GH-8158)
Show description for c287545
banool
authored and
ncoghlan
committed
c287545
View commit details
Copy full SHA for c287545
View code at this point
Browse repository at this point
Commits on Jan 25, 2018
bpo-29302: Implement contextlib.AsyncExitStack. (#4790)
Kentzo
authored and
Yury Selivanov
committed
1aa094f
View commit details
Copy full SHA for 1aa094f
View code at this point
Browse repository at this point
Commits on Dec 14, 2017
bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412)
JelleZijlstra
authored and
Yury Selivanov
committed
176baa3
View commit details
Copy full SHA for 176baa3
View code at this point
Browse repository at this point
Commits on Nov 23, 2017
bpo-10049: Add a "no-op" (null) context manager to contextlib (GH-4464)
Show description for 0784a2e
Jesse-Bakker
authored and
ncoghlan
committed
0784a2e
View commit details
Copy full SHA for 0784a2e
View code at this point
Browse repository at this point
Commits on May 1, 2017
bpo-29679: Implement @contextlib.asynccontextmanager (#360)
JelleZijlstra
authored and
1st1
committed
2e62469
View commit details
Copy full SHA for 2e62469
View code at this point
Browse repository at this point
Commits on Aug 31, 2016
Closes #27904: Improved logging statements to defer formatting until needed.
vsajip
committed
dd917f8
View commit details
Copy full SHA for dd917f8
View code at this point
Browse repository at this point
Commits on Jun 9, 2016
Add a missing :term:.
brettcannon
committed
516f546
View commit details
Copy full SHA for 516f546
View code at this point
Browse repository at this point
Commits on May 10, 2016
Issue #23921: Standardized documentation whitespace formatting.
Show description for c499f30
serhiy-storchaka
committed
c499f30
View commit details
Copy full SHA for c499f30
View code at this point
Browse repository at this point
Issue #23921: Standardized documentation whitespace formatting.
Show description for dba9039
serhiy-storchaka
committed
dba9039
View commit details
Copy full SHA for dba9039
View code at this point
Browse repository at this point
Commits on Apr 8, 2016
Issue #25609: Introduce contextlib.AbstractContextManager and
Show description for 9e080e0
brettcannon
committed
9e080e0
View commit details
Copy full SHA for 9e080e0
View code at this point
Browse repository at this point
Commits on Mar 31, 2016
Remove redundant leading zeroes in PEP references.
serhiy-storchaka
committed
e4ba872
View commit details
Copy full SHA for e4ba872
View code at this point
Browse repository at this point
Commits on Nov 2, 2015
Issue #25523: Merge a-to-an corrections from 3.4.
serhiy-storchaka
committed
a84f6c3
View commit details
Copy full SHA for a84f6c3
View code at this point
Browse repository at this point
Issue #25523: Further a-to-an corrections.
serhiy-storchaka
committed
d65c949
View commit details
Copy full SHA for d65c949
View code at this point
Browse repository at this point
Commits on Oct 10, 2015
Issue #25161: Merge full stops from 3.4 into 3.5
vadmium
committed
84835ab
View commit details
Copy full SHA for 84835ab
View code at this point
Browse repository at this point
Issue #25161: Add full stops in documentation; patch by Takase Arihiro
vadmium
committed
d21e0b5
View commit details
Copy full SHA for d21e0b5
View code at this point
Browse repository at this point
Commits on Nov 28, 2014
Issue #22389: Add contextlib.redirect_stderr().
berkerpeksag
committed
bb44fe0
View commit details
Copy full SHA for bb44fe0
View code at this point
Browse repository at this point
Commits on Oct 12, 2014
Issue #21061: correctly note redirect_stdout is reentrant
ncoghlan
committed
36d8ef9
View commit details
Copy full SHA for 36d8ef9
View code at this point
Browse repository at this point
Commits on Oct 10, 2014
Issue 22603: add missing 'self'. Patch by Francisco Fernández Castaño.
terryjreedy
committed
f9bd920
View commit details
Copy full SHA for f9bd920
View code at this point
Browse repository at this point
Commits on May 26, 2014
Issue 21558: Fix a typo in the contextlib docs
rhettinger
committed
e8e2df3
View commit details
Copy full SHA for e8e2df3
View code at this point
Browse repository at this point
Commits on Nov 3, 2013
Close #19403: make contextlib.redirect_stdout reentrant
ncoghlan
committed
8e113b4
View commit details
Copy full SHA for 8e113b4
View code at this point
Browse repository at this point
Commits on Oct 20, 2013
What's New updates prior to alpha
ncoghlan
committed
0acceb7
View commit details
Copy full SHA for 0acceb7
View code at this point
Browse repository at this point
Commits on Oct 19, 2013
contextlib doc updates and refactoring
Show description for 8608d26
ncoghlan
committed
8608d26
View commit details
Copy full SHA for 8608d26
View code at this point
Browse repository at this point
Commits on Oct 17, 2013
Close #19266: contextlib.ignore -> contextlib.suppress
Show description for 240f86d
ncoghlan
committed
240f86d
View commit details
Copy full SHA for 240f86d
View code at this point
Browse repository at this point
Commits on Oct 13, 2013
Fix spacing of toplevel items.
birkenfeld
committed
a7c17e5
View commit details
Copy full SHA for a7c17e5
View code at this point
Browse repository at this point
Docs tweaks for contextlib additions
ncoghlan
committed
b4534ae
View commit details
Copy full SHA for b4534ae
View code at this point
Browse repository at this point
Commits on Oct 11, 2013
Rename contextlib.ignored() to contextlib.ignore().
rhettinger
committed
1254b40
View commit details
Copy full SHA for 1254b40
View code at this point
Browse repository at this point
Commits on Oct 10, 2013
Issue #15805: Add contextlib.redirect_stdout()
rhettinger
committed
088cbf2
View commit details
Copy full SHA for 088cbf2
View code at this point
Browse repository at this point
Commits on May 10, 2013
Merge 3.3
warsaw
committed
8c01ffa
View commit details
Copy full SHA for 8c01ffa
View code at this point
Browse repository at this point
I was confused before. It's correct to not call .close() inside the with
Show description for d8f870d
warsaw
committed
d8f870d
View commit details
Copy full SHA for d8f870d
View code at this point
Browse repository at this point
Commits on Apr 19, 2013
Merge 3.3
warsaw
committed
24aa159
View commit details
Copy full SHA for 24aa159
View code at this point
Browse repository at this point
Minor typo in example.
warsaw
committed
0aa685a
View commit details
Copy full SHA for 0aa685a
View code at this point
Browse repository at this point
Commits on Apr 1, 2013
Issue #17586: fix typo in contextlib.rst
ned-deily
committed
05bdd85
View commit details
Copy full SHA for 05bdd85
View code at this point
Browse repository at this point
Commits on Mar 11, 2013
#17351: merge with 3.3.
ezio-melotti
committed
a41fb4b
View commit details
Copy full SHA for a41fb4b
View code at this point
Browse repository at this point
Previous
Next
You can’t perform that action at this time.