[docutils:bugs] #460 default settings do not provide required settings values

"Günter Milde" via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/bugs/460/1f99ba574ffe34bb21c8755a31b77a4ececc2cc7.bugs@docutils.p.sourceforge.net>
- **status**: open --> closed-invalid
- **Comment**:

Closing this bug as it is rather a misunderstanding than wrong behaviour.
Suggestions for improving the documentation are still welcome.



---

** [bugs:#460] default settings do not provide required settings values**

**Status:** closed-invalid
**Labels:** standalone reader 
**Created:** Sat Nov 12, 2022 02:17 AM UTC by Ryan de Kleer
**Last Updated:** Wed Nov 30, 2022 09:24 PM UTC
**Owner:** nobody


# Platform
Windows 10
Python 3.7
docutils 0.19.1b.dev

# Issue
Generating a document with the standalone reader fails with default settings.

# Example
```python
from docutils.readers import standalone
from docutils.parsers import rst
from docutils import io
from docutils.frontend import get_default_settings

from docutils import __version__

rst_src = """
A Document
----------
Simple but enough.
"""

def try_this():
    print(__version__)

    src = io.StringInput(rst_src)
    parser = rst.Parser()
    reader = standalone.Reader(parser=parser)
    settings = get_default_settings(reader)
    document = reader.read(src, parser, settings)
    
 try_this()
```

Results in:

```python
0.19.1b.dev
Traceback (most recent call last):
 line 19, in try_this
    document = reader.read(src, parser, settings)
 
 ...
 
File "docutils/parsers/rst/states.py", line 607, in init_customizations
    if settings.pep_references:
AttributeError: 'Values' object has no attribute 'pep_references'
```




---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.