Opened 8 years ago

Closed 5 years ago

#51572 closed enhancement (wontfix)

port selecting python3 as python should emit a warning

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: jyrkiwahlstedt, jaroel (Roel Bruggink), larryv (Lawrence Velázquez), yan12125 (Chih-Hsuan Yen)
Port: python_select python2_select python3_select python24 python25 python26 python27 python31 python32 python33 python34 python35 python36

Description (last modified by jeremyhu (Jeremy Huddleston Sequoia))

Using any version of python 3 as the python interpreter is not supported. python should only refer to python2. If users want to try configuring their system in this unsupported manner, they should be warned by 'port select' when doing so.

See https://www.python.org/dev/peps/pep-0394

Change History (6)

comment:1 Changed 8 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Description: modified (diff)

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

We should just make port select python only able to select python 2.x versions. It would fix problems like #32575 and #49591. Users should use port select python3 to set the python3 symlink. We could even consider deprecating the python2_select port and rolling its functionality (i.e. setting the python2 symlink) into the python_select port (or vice versa).

comment:3 Changed 8 years ago by raimue (Rainer Müller)

Cc: jyrkiwahlstedt roel@… added
Component: baseports
Port: python_select python2_select python3_select python24 python25 python26 python27 python31 python32 python33 python34 python35 python36 added

Moving this to the ports that need to implement PEP 394.

comment:4 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: larryv added

comment:5 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

Cc: yan12125 added

comment:6 Changed 5 years ago by yan12125 (Chih-Hsuan Yen)

Resolution: wontfix
Status: newclosed

I don't think there is a need for such a change now. Some reasons:

  1. PEP 394 has been updated to allow pointing "python" to a python 3.x interpreter (1).
  2. Python 2 is going to be dead. It's natural for users to select python 3.x as the default python command.
  3. Issues like #32575 and #49591 should be fixed in individual ports. For example, patch their build system to use python 2.x instead merely "python".

(1) https://github.com/python/peps/commit/ae932bd6fd2c493d7d64ce328a5293bac4c48884

Note: See TracTickets for help on using tickets.