Skip to content

Failure of deprecation warning mechanism of sphinx.util.compat.Directive with IPython extension #3873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jfbu opened this issue Jun 17, 2017 · 1 comment
Milestone

Comments

@jfbu
Copy link
Contributor

jfbu commented Jun 17, 2017

Subject: the sphinx.util.compat module is deprecated at 1.6 and will be removed at 1.7. But when I use ipython directive with Sphinx 1.6.2, there is no warning.

Procedure to reproduce the problem

With Sphinx 1.6.2:

mkdir /tmp/IPython-test
cd /tmp/IPython-test
yes "n" | sphinx-quickstart --dot _ --project IPython-test --author "Example" -v 0 --release 0 --language en --suffix .rst --master index --makefile --batchfile .
echo "
extensions = [
    'IPython.sphinxext.ipython_console_highlighting',
    'IPython.sphinxext.ipython_directive',
]

ipython_mplbackend = None
" >> conf.py
echo "
Welcome to IPython-test's documentation!
========================================

.. ipython::

   In [1]: x = 1

   In [2]: y = x**2

   In [3]: print(y)

" > index.rst
make html

there is no warning.

On the other hand when using Sphinx master branch, build fails

Extension error:
Could not import extension IPython.sphinxext.ipython_directive (exception: No module named 'sphinx.util.compat')
make: *** [Makefile:20: html] Error 1

Expected results

1.6.x Sphinx users of ipython directive get a warning and can report upstream... but I did it already at ipython/ipython#10666 ;-)

Environment info

  • OS: Mac
  • Python version: 3.5.3
  • IPython version: 6.1.0
  • Sphinx version: 1.6.2
@tk0miya tk0miya added this to the 1.6.3 milestone Jun 18, 2017
tk0miya added a commit that referenced this issue Jun 24, 2017
@tk0miya
Copy link
Member

tk0miya commented Jun 24, 2017

Fixed at 6a37912.

@tk0miya tk0miya closed this as completed Jun 24, 2017
tk0miya added a commit that referenced this issue Jun 25, 2017
tony added a commit to eduflow/sphinx-graphiql that referenced this issue Dec 20, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants