Skip to content

Accept None value in ZstdCompressor/ZstdDecompressor constructors parameters#153

Closed
rodrigozhou wants to merge 2 commits into
indygreg:mainfrom
rodrigozhou:accept_none_values
Closed

Accept None value in ZstdCompressor/ZstdDecompressor constructors parameters#153
rodrigozhou wants to merge 2 commits into
indygreg:mainfrom
rodrigozhou:accept_none_values

Conversation

@rodrigozhou
Copy link
Copy Markdown
Contributor

Change constructors of ZstdCompressor and ZstdDecompressor to accept explicit None value for optional parameters (eg: dict_data). Also changing stubs to reflect this.

Copy link
Copy Markdown
Owner

@indygreg indygreg left a comment

Choose a reason for hiding this comment

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

This patch seems reasonable to me and fixes an unwanted divergence in behavior between the C and CFFI backends.

Could you please add a test that verifies that None arguments work? This will help ensure the different backends have consistent behavior.

@rodrigozhou rodrigozhou requested a review from indygreg July 19, 2021 22:39
Copy link
Copy Markdown
Owner

@indygreg indygreg left a comment

Choose a reason for hiding this comment

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

This looks good to me!

I'm going to tweak the commits up slightly as part of rebasing. But I will preserve your author annotation so you get credit for the change.

Thank you for this contribution!

@indygreg indygreg closed this in f0c6f93 Oct 16, 2021
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