#982: invenio connector: fix compatibility with newer mechanize versions
-------------------+----------------------
Reporter: simko | Owner: lruedaga
Type: defect | Status: new
Priority: major | Component: MiscUtil
Version: | Keywords:
-------------------+----------------------
Invenio connector should be fixed WRT mechanize 0.2.0+ compatibility that
changed how `ClientForm` is used.
We are using it here:
{{{
$ git grep -Hni ClientForm
modules/miscutil/lib/invenio_connector.py:53: import ClientForm
modules/miscutil/lib/invenio_connector.py:168: raise
InvenioConnectorAuthError("The Python modules Mechanize and Clie
modules/miscutil/lib/invenio_connector.py:456:
form_parser_class=ClientForm.XHTMLCompatibleFormParser)
}}}
The mechanize author writes:
{{{
ClientForm. This functionality provided by this module is now part of
mechanize. I don't intend to make further standalone releases of
ClientForm.
}}}
Debian upgrade instructions say:
{{{
Since mechanize 0.2.0, ClientForm has been merged into mechanize. You
can update source code based on ClientForm by replacing any occurrence
of ClientForm by mechanize in your source code, and ensure any use of
the module logging logger named "ClientForm" is updated to use the new
logger name "mechanize.forms".
}}}
We should check `mechanize.__version__` after import and either use
ClientForm forms or mechanize forms, as appropriate, so that both old and
new mechanize versions are supported.
--
Ticket URL: <http://invenio-software.org/ticket/982>
Invenio <http://invenio-software.org>