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

Conversation

@serhiy-storchaka

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.

pablogsal

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.

Choose a reason for hiding this comment

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

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.

pablogsal

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.

Choose a reason for hiding this comment

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

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.

rhettinger

@ambv

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

@1st1 1st1 mentioned this pull request

Apr 11, 2023

@github-actions

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

Labels

stale

Stale PR or inactive for long period of time.

type-bug

An unexpected behavior, bug, or error