FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-69968: Prevent cycles in the __context__ chain. by serhiy-storchaka · Pull Request #20543 · python/cpython · GitHub

/ cpython Public

gh-69968: Prevent cycles in the __context__ chain. - #20543

Draft
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:set-context-reordering
Draft

serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:set-context-reordering

Conversation

serhiy-storchaka commented May 30, 2020 •
edited
Loading

Copy link
Copy Markdown
Member

Setting __context__ to self has no any effect. If set __context__ to the chain contained original exception, it is moved to the start of the context chain.

https://bugs.python.org/issue25782

Setting __context__ to self has no any effect.  If set
__context__ to the chain contained original exception, it is moved to
the start of the context chain.
Comment thread Doc/c-api/exceptions.rst
Comment on lines +605 to +606
If *ctx* is *ex*, the function has no any effect. If *ex* is in the
context chain started from *ctx*, it is moved to the start of the chain.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
If *ctx* is *ex*, the function has no any effect. If *ex* is in the
context chain started from *ctx*, it is moved to the start of the chain.
If *ctx* is *ex*, the function has no effect. If *ex* is in the
context chain started from *ctx*, it is moved to the start of the chain.

Comment on lines +71 to +73
Setting :attr:`__context__` to self has no any effect. If set
``__context__`` to the chain contained original exception, it is moved to
the start of the context chain.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
Setting :attr:`__context__` to self has no any effect. If set
``__context__`` to the chain contained original exception, it is moved to
the start of the context chain.
Setting :attr:`__context__` to self has no effect. If set
``__context__`` to the chain contained an original exception, it is moved to
the start of the context chain.

ambv commented May 17, 2022

Copy link
Copy Markdown
Contributor

This missed the boat for inclusion in Python 3.9 which accepts security fixes only as of today.

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 8, 2026
serhiy-storchaka changed the title bpo-25782: Prevent cycles in the __context__ chain. gh-69968: Prevent cycles in the __context__ chain. Aug 12, 2026
github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL