Skip to content

Fixed Temorary Config Conext Manager - #2018

Merged
philip-paul-mueller merged 1 commit into
spcl:mainfrom
philip-paul-mueller:fixed_temporary_configuration
May 30, 2025
Merged

Fixed Temorary Config Conext Manager#2018
philip-paul-mueller merged 1 commit into
spcl:mainfrom
philip-paul-mueller:fixed_temporary_configuration

Conversation

@philip-paul-mueller

Copy link
Copy Markdown
Collaborator

The two context managers for temporary configuration contexts, i.e. set_temporary() and temporary_config(), contained a bug.
If the context, i.e. the with-clause, was left through an exception then the old configuration state was not restored.
This could lead to the leaking of configuration options.

@phschaad phschaad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM - thanks!

@phschaad
phschaad enabled auto-merge May 26, 2025 08:56
@phschaad
phschaad added this pull request to the merge queue May 26, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 26, 2025
@phschaad
phschaad added this pull request to the merge queue May 26, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 26, 2025
@philip-paul-mueller
philip-paul-mueller added this pull request to the merge queue May 30, 2025
Merged via the queue into spcl:main with commit b592ae2 May 30, 2025
@philip-paul-mueller
philip-paul-mueller deleted the fixed_temporary_configuration branch May 30, 2025 10:20
iomaganaris pushed a commit to GridTools/dace that referenced this pull request Aug 19, 2025
The two context managers for temporary configuration contexts, i.e.
`set_temporary()` and `temporary_config()`, contained a bug.
If the context, i.e. the `with`-clause, was left through an exception
then the old configuration state was not restored.
This could lead to the leaking of configuration options.

Co-authored-by: Philip Mueller <philip.paul.mueller@bluemain.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants