This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: maximum recursion installing readline package
Type: behavior Stage: resolved
Components: Build, Distutils, Distutils2 Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, iritkatriel, mathieu37, tarek
Priority: normal Keywords:

Created on 2012-10-28 08:48 by mathieu37, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg174012 - (view) Author: Mathieu Dutour Sikiric (mathieu37) Date: 2012-10-28 08:48
Dear all,

I tried to install Python 2.7.3 in a home directory for simplicity. On the Ubuntu platform that I had, the readline-dev was not installed.
So, I I tried to install the readline package either by "pip install readline" or "python setup.py install" and what I got was following behavior:
------------------------------------------------------------------
.
.
.
  File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 1118, in write_pkg_file

    self._write_field(file, 'Metadata-Version', version)

  File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 1145, in _write_field

    file.write('%s: %s\n' % (name, self._encode_field(value)))

  File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 1154, in _encode_field

    if isinstance(value, unicode):

RuntimeError: maximum recursion depth exceeded while calling a Python object
----------------------------------------------------------------------
So, the install went into an infinite loop and crashed.
Instead the correct error message that should have been shown at some point is missing .h file.

I am a beginner on Python, I asked on help@python.org and Matthew Dixon Cowles indicated me that I should report the problem here.
msg177186 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-12-09 00:09
On a Ubuntu system you don’t need to install readline from PyPI: CPython has a readline module, which gets compiled if the headers are available.

That said, the error you report is still strange.  Can you attach the full console output as a text file?
msg177202 - (view) Author: Mathieu Dutour Sikiric (mathieu37) Date: 2012-12-09 07:03
Well, that was the points, the headers were not available.

  Mathieu

On Sunday, December 9, 2012, Éric Araujo wrote:

>
> Éric Araujo added the comment:
>
> On a Ubuntu system you don’t need to install readline from PyPI: CPython
> has a readline module, which gets compiled if the headers are available.
>
> That said, the error you report is still strange.  Can you attach the full
> console output as a text file?
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org <javascript:;>>
> <http://bugs.python.org/issue16346>
> _______________________________________
>
msg381779 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-11-24 22:56
write_pkg_file looks very different now.
History
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60550
2020-11-24 22:56:39iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg381779

resolution: out of date
stage: resolved
2015-08-02 01:06:19martin.pantersettitle: readline problem -> maximum recursion installing readline package
2012-12-09 07:03:51mathieu37setmessages: + msg177202
2012-12-09 00:09:03eric.araujosetmessages: + msg177186
2012-10-28 08:50:27ezio.melottisetassignee: eric.araujo

type: compile error -> behavior
components: + Distutils, Distutils2
nosy: + tarek, eric.araujo, alexis
2012-10-28 08:48:55mathieu37create