MechanicalSoup v0.12.0 Release NotesRelease Date: 2019-08-27 // 11 months ago
🔄 Changes in official python version support: added 3.7 and dropped 3.4.
⚡️ Added ability to submit a form without updating
submit_selected(..., update_state=False). This means you get a response from the form submission, but your browser stays on the same page. Useful for handling forms that result in a file download or open a new tab.
🐛 Bug fixes
👌 Improve handling of form enctype to behave like a real browser. [#242]
typeattributes are no longer required to be lowercase. [#245]
Form controls with the
disabledattribute will no longer be submitted to improve compliance with the HTML standard. If you were relying on this bug to submit disabled elements, you can still achieve this by deleting the
disabledattribute from the element in the
Formobject directly. [#248]
💻 When a form containing a file input field is submitted without choosing a file, an empty filename & content will be sent just like in a real browser. [#250]
<option>tags without a
valueattribute will now use their text as the value. [#252]
download_linkwas fixed so that it is no longer ignored. [#256]
👍 Allow duplicate submit elements instead of raising a LinkNotFoundError. [#264]
🚀 Our thanks to the many new contributors in this release!
Previous changes from v0.11.0
📚 This release focuses on fixing bugs related to uncommon HTTP/HTML scenarios and on improving the documentation.
🐛 Bug fixes
🗄 Constructing a
Forminstance from a
bs4.element.Tagwhose tag name is not
formwill now emit a warning, and may be deprecated in the future. [#228]
💥 Breaking Change:
LinkNotFoundErrornow derives from
BaseException. While this will bring the behavior in line with most people's expectations, it may affect the behavior of your code if you were heavily relying on this implementation detail in your exception handling. [#203]
👌 Improve handling of
buttonsubmit elements. Will now correctly ignore buttons of type
resetduring form submission, since they are not considered to be submit elements. [#199]
👷 Do a better job of inferring the content type of a response if the
Content-Typeheader is not provided. [#195]
👌 Improve consistency of query string construction between MechanicalSoup and web browsers in edge cases where form elements have duplicate name attributes. This prevents errors in valid use cases, and also makes MechanicalSoup more tolerant of invalid HTML. [#158]