This project is archived and is in readonly mode.
Documentation fails to build with Python 3
-
Arfrever
Above output was misformatted. Correct output:
$ cd psycopg2-2.4.5/doc $ make text cd src && make text make[1]: Entering directory `/tmp/psycopg2-2.4.5/doc/src' sphinx-build -b text -d _build/doctrees . _build/text Making output directory... Running Sphinx v1.1.3 loading pickled environment... not yet created loading intersphinx inventory from http://docs.python.org/objects.inv... loading intersphinx inventory from http://docs.python.org/3.2/objects.inv... building [text]: targets for 12 source files that are out of date updating environment: 12 added, 0 changed, 0 removed reading sources... [100%] usage looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] usage build succeeded. Build finished. The text pages are in _build/text. make[1]: Leaving directory `/tmp/psycopg2-2.4.5/doc/src' cd src && tools/stitch_text.py index.rst _build/text > ../psycopg2.txt tools/stitch_text.py:21: ResourceWarning: unclosed file <_io.TextIOWrapper name='index.rst' mode='r' encoding='UTF-8'> have_line = iter(open(fn)).next Traceback (most recent call last): File "tools/stitch_text.py", line 55, in <module> sys.exit(main()) File "tools/stitch_text.py", line 15, in main for fb in iter_file_base(index): File "tools/stitch_text.py", line 21, in iter_file_base have_line = iter(open(fn)).next AttributeError: '_io.TextIOWrapper' object has no attribute 'next' make: *** [text] Error 1 -
Daniele Varrazzo
Any specific need to build the docs with python 3?
I personally don't feel such a need. If you do, feel free to provide a patch for the error:
stitch_text.pyis a very simple script. -
Arfrever
What is minimal supported version of Python?
-
Daniele Varrazzo
Psycopg works with Python between 2.4 and 3.2, but building the docs is something we only do at release time, so it likely happens with python 2.6 or 2.7.
-
Arfrever
This patch preserves compatibility with Python 2.4.
This patch also fixes some ResourceWarnings about unclosed files, which can be seen with Python >=3.2 when PYTHONWARNINGS="d" environmental variable is exported. -
Daniele Varrazzo
- State changed from open to resolved
Patch applied in my dev branch. Thank you very much.
