The Wire · Showcase
DJANGO PINS SELENIUM TO DODGE ATTRIBUTE PARSING BREAK
By RepoJournal · Filed · About Django
Selenium 4.44.0 flipped the return value for missing class attributes from empty string to None, and Django's test suite just caught it mid-flight.
The Django test infrastructure pinned selenium to versions below 4.44.0 after discovering a breaking change in how get_attribute('class') behaves [1]. When an element has no class attribute, selenium 4.44.0+ now returns None instead of an empty string, a shift that breaks Django's existing test assertions. The issue has been reported upstream to the Selenium project [2], but the pin ensures your test suite doesn't crack on upgrade.
On the feature front, RedirectView now supports the preserve_request argument [3], bringing parity with Django's redirect() shortcut. When enabled, it returns 307 (temporary) or 308 (permanent) status codes instead of 302/301, properly preserving the original request method. Default behavior stays unchanged, so existing code runs untouched [4].
The djangoproject.com site added test coverage for the theme toggle button [5], hardening the documentation interface against future regressions. These incremental test additions compound over time into a safer deployment surface.
Action items
- → Pin selenium to <4.44.0 in your test dependencies now django/django [immediate]
- → Review RedirectView usage if you've been wanting preserve_request behavior django/django [plan]
- → Monitor Selenium's response to the upstream bug report SeleniumHQ/selenium [monitor]
References
- [1] Pinned selenium version to "<4.44.0" due to change in get_attribute("class") behavior. ↗ django/django
- [2] Pinned selenium version to "<4.44.0" due to change in get_attribute("class") behavior. django/django
- [3] Fixed #37062 -- Added preserve_request support to RedirectView. ↗ django/django
- [4] Fixed #37062 -- Added preserve_request support to RedirectView. django/django
- [5] Added tests for theme toggle button. ↗ django/djangoproject.com
FAQ
- What changed in Django on May 16, 2026?
- Selenium 4.44.0 flipped the return value for missing class attributes from empty string to None, and Django's test suite just caught it mid-flight.
- What should Django teams do about it?
- Pin selenium to <4.44.0 in your test dependencies now • Review RedirectView usage if you've been wanting preserve_request behavior • Monitor Selenium's response to the upstream bug report
- Which Django repositories shipped on May 16, 2026?
- django/django, django/djangoproject.com