alex-rudakov / sphinx-argparse

Sphinx extension that automatically document argparse commands and options
MIT License
49 stars 40 forks source link

Import Directive from docutils.parsers.rst #66

Closed userzimmermann closed 7 years ago

userzimmermann commented 7 years ago

Instead of sphinx.util.compat, which is deprecated, causes problems with rc releases of docutils, and also just imports Directive from docutils.parsers.rst

Closes https://github.com/ribozz/sphinx-argparse/issues/65

jayvdb commented 7 years ago

One small complication is that sphinx-argparse doesnt declare its minimum requirement for Sphinx. I've created a separate issue about that (https://github.com/ribozz/sphinx-argparse/issues/67) with a bit of background research.

My digging shows that this extension requires at least Sphinx 1.0+ , so this patch is :+1:

docutils.parsers.rst.Directive class first appeared in docutils SVN r4667 , which is docutils 0.5 , as 0.4 used functions.

As docutils 0.5 was already a minimum requirement, importing a docutils 0.5 name cant hurt.

dpryan79 commented 7 years ago

Thanks @userzimmermann!

userzimmermann commented 7 years ago

@dpryan79 Could you quickly make a new release? Please :)

dpryan79 commented 7 years ago

@userzimmermann Sure, coming right up!

dpryan79 commented 7 years ago

This is now live on pypi (version 0.2.1). I'll try to get it in conda-forge today.

userzimmermann commented 7 years ago

@dpryan79 Thanks :)