[MacPorts] #48807: python messes with terminal state on exit

MacPorts noreply at macports.org
Tue Jun 21 09:43:36 PDT 2016


#48807: python messes with terminal state on exit
-------------------------------------------------+-------------------------
  Reporter:  yselivanov@…                        |      Owner:  jwa@…
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:  2.3.3
Resolution:                                      |   Keywords:  haspatch
      Port:  python26 python27 python python34   |
  python35 libedit                               |
-------------------------------------------------+-------------------------

Comment (by eborisch@…):

 I've attached a [attachment:py27.patch patch] that will make the python27
 port act like the others, where it still installs and builds against
 libedit, but with the install time notes suggesting py27-readline be
 installed. I will commit it in a few days if there are no objections. This
 will "resolve" the licensing status, but means installing a broken (to my
 mind) python if the user runs {{{sudo port install python27}}} and doesn't
 read/notice/act on the notes.

 I've also attached a fix; but I'm not sure that it will be accepted
 upstream. Read on...

 I believe I've found the (opposite) issue here:
 http://gnats.netbsd.org/48957. Arising from this PR,
 [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline.c.diff?r1=1.110&r2=1.111&only_with_tag=MAIN&f=h
 r1.111], undid a change in
 [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline.c.diff?r1=1.84&r2=1.85&only_with_tag=MAIN&f=h
 r1.85], which were from a set of Apple patches.

 I can confirm that undoing the upstream (1.111) change (commenting out one
 line: [attachment:readline_c.diff]) fixes the broken shell state on python
 exit under macOS. This change, however, was clearly viewed as incorrect
 upstream.

 For reference,
 [http://opensource.apple.com/source/libedit/libedit-43/src/readline.c
 Apple's version] based on 1.106 currently has this line commented out.

 I suggest we match Apple's libedit behavior here, at least for this quirk.
 Remove the patch if/when Apple aligns with NetBSD. (Add
 [attachment:readline_c.diff] as a patchfile.) At that time, changes may be
 required in Python, and appropriate upstream reports can be filed.

 Alternatively, we could see if python's {{{__APPLE__}}} fenced code in its
 own readline.c can be removed safely with the latest upstream libedit; I
 haven't had time to do this, but maybe someone else will...

 As to how this impacts anything else using libedit, I can't say as I
 haven't looked.

-- 
Ticket URL: <https://trac.macports.org/ticket/48807#comment:72>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list