internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.11k stars 1.34k forks source link

MARC html view code needs to be updated to use non-deprecated methods #3057

Closed hornc closed 1 year ago

hornc commented 4 years ago

https://github.com/internetarchive/openlibrary/blob/51d8af69899e4b2d36cbd410b9db98209d27f587/openlibrary/catalog/marc/html.py

is used to convert and display the MARC record information on pages like https://openlibrary.org/show-records/CollingswoodLibraryMarcDump10-27-2008/Collingswood.out:33646004:794

Currently this code produces deprecation warnings in the logs

web_1        | /openlibrary/openlibrary/catalog/marc/html.py:26: DeprecationWarning: Call to deprecated function (or staticmethod) translate. (Use openlibrary.catalog.marc.MarcBinary instead.)
web_1        |   'v': lambda s: esc(translate(s, self.is_marc8)),

Remove dependency on marc/fast_parse

Evidence / Screenshot (if possible)

Relevant url?

Steps to Reproduce

  1. Go to ...
  2. Do ...

Details

Proposal & Constraints

Related files

Stakeholders

hornc commented 1 year ago

https://github.com/internetarchive/openlibrary/blob/0badb9428db9e481b72ce06e29e9913c2dd3c393/openlibrary/catalog/marc/html.py no longer has a dependency on fast_parse (which has been removed)

/ fixed in 9b0d920df676489183f4ca5d997d41dd7485e46a