Skip to content

Use isinstance instead of type is for config#1028

Open
mdellweg wants to merge 1 commit intoIdentityPython:masterfrom
mdellweg:isinstance
Open

Use isinstance instead of type is for config#1028
mdellweg wants to merge 1 commit intoIdentityPython:masterfrom
mdellweg:isinstance

Conversation

@mdellweg
Copy link
Copy Markdown

@mdellweg mdellweg commented May 7, 2026

In Django you can use special settings drivers that may represent dicts as a subclass of pythons 'dict'. In this case leading to crash while parsing the metadata section of the config.

Description

The feature or problem addressed by this PR
What your changes do and why you chose this solution

It changes the check for an identical dict type to also match all subclasses.
The change appears pretty straight forward to me, and allows pysaml2 to be used in combination with e.g. DynaConf.
I might need a pointer for a good strategy to test this.

Checklist

  • Checked that no other issues or pull requests exist for the same issue/change
  • Added tests covering the new functionality
  • Updated documentation OR the change is too minor to be documented
  • Updated CHANGELOG.md OR changes are insignificant

In Django you can use special settings drivers that may represent dicts as a
subclass of pythons 'dict'. In this case leading to crash while parsing the
metadata section of the config.
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.

1 participant