svx / sphinxcontrib-osexample

This Sphinx extension is intended to display package manager examples next to each other
11 stars 3 forks source link

exception:'Sphinx' object has no attribute 'add_javascript' #8

Open numero-744 opened 1 year ago

numero-744 commented 1 year ago

Hello,

I get this error:

Running Sphinx v5.3.0
loading pickled environment... done
WARNING: The app.add_stylesheet() is deprecated. Please use app.add_css_file() instead.

Extension error (sphinxcontrib.osexample):
Handler <function add_assets at 0x7f4bc90a4ee0> for event 'builder-inited' threw an exception (exception:'Sphinx' object has no attribute 'add_javascript')
% cat requirements.txt
sphinx==5.3.0
sphinx-rtd-theme==0.5.2
sphinxcontrib-wavedrom==3.0.4
sphinxcontrib-osexample @ git+https://github.com/svx/sphinxcontrib-osexample.git@1cc4afcc6089083256aa642d9faa12352ef45d68
sphinx-multiversion @ git+https://github.com/samuel-emrys/sphinx-multiversion.git@cd723351f687c98d32834226ae7b3ec9e63bcba5
dlmiles commented 1 year ago

The fix maybe to migrate APIs (and observe any minor change in argument expectations): app.add_javascript() => app.add_js_file() app.add_stylesheet() => app.add_css_file()