#36124: Importing from django.contrib.admindocs.views modifies docutils rst 
parser
-------------------------------------+-------------------------------------
     Reporter:  Michal Čihař         |                     Type:
                                     |  Uncategorized
       Status:  new                  |                Component:
                                     |  contrib.admindocs
      Version:  5.1                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 Doing `from django.contrib.admindocs.views import simplify_regex` is
 enough to make admindocs customize docutils rst parser what might have
 undesired side effects. I've ran into this via django-rest-framework
 (https://github.com/encode/django-rest-framework/issues/9626), but there
 are apparently more users of this function
 
(https://github.com/search?q=%22from+django.contrib.admindocs.views+import+simplify_regex%22&type=code).
 Not sure if this interface is considered public or not, but apparently it
 got some users.

 Docutils lack of local registry (https://sourceforge.net/p/docutils
 /feature-requests/38/) so there is currently no way to make the
 customization local to admindocs.

 Would it be possible to separate simplify_regex logic to some utility
 module that could be reused by others and would not suffer such side
 effects? Any other ideas how to address this?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36124>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701948deabf8e-d2aa5a21-74c0-4231-a4c8-522e3ee52341-000000%40eu-central-1.amazonses.com.

Reply via email to