Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 ResponseParser config is mutable and non-global (backports #381) #382

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Jan 24, 2025

When ResponseParser was initialized without any explicit config, it used
Config.global directly.  This meant that changes to `parser.config` were
also changes to the _global_ config!

When ResponseParser is initialized with a config hash, that creates
a frozen config object.  This meant that changes to `parser.config` were
impossible.

So, when the given config is global or frozen, we create a new config
and inherit from the given config.  We want to continue using the given
config as-is in other cases, so the client and its parser can share the
same exact config.
@nevans nevans added the enhancement New feature or request label Jan 24, 2025
@nevans nevans merged commit 195ee23 into v0.4-stable Jan 24, 2025
30 checks passed
@nevans nevans deleted the backport-response_parser-mutable-config branch January 24, 2025 18:03
@nevans nevans added the backport This issue or PR is for a stable release branch label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport This issue or PR is for a stable release branch enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

1 participant