Python 3.13 Compatibility (cgi, dbm.sqlite)
Closes #976
Description
I recently wrote a blog post demonstrating how to use Django as a service provider, with pysaml2 serving as an example IdP. A reader has since pointed out that it doesn’t work with Python 3.13.
The feature or problem addressed by this PR
After some investigation, I found two issues:
- removal of the cgi module in Python 3.13 #976
dbm.sqlitebeing the new default dbm backend introduced in Python 3.13
What your changes do and why you chose this solution
This PR removes remaining usages of the deprecated cgi module and uses dbm.gnu as the default dbm backend which is used by _shelve_compat.
Checklist
- [x] Checked that no other issues or pull requests exist for the same issue/change
- [ ] Added tests covering the new functionality
- [x] Updated documentation OR the change is too minor to be documented
- [x] Updated CHANGELOG.md OR changes are insignificant
Hmm, this is actually kind of hard to test..
I started looking for 3.13 and pysaml2 and saw this PR opened 1 hour ago :)
Related thread: https://github.com/python/cpython/issues/100414
Also related thread: https://discuss.python.org/t/new-default-preferred-dbm-backend/44228/4
uhm, I pushed and ended up syncing ephes:master with pysaml2:master instead of adding changes.. This resulted in the PR being closed.
I create a new PR #1007 which I intend to merge.