Allow Python versions >=3.10 and IPython alternate command as default shell options#2242
Allow Python versions >=3.10 and IPython alternate command as default shell options#2242novaTopFlex wants to merge 2 commits intoGuake:masterfrom
Conversation
In certain types of Linux packaging, the command for the IPython interpreter may be named "ipython2" and/or "ipython3" rather than simply "ipython" to distinguish Python 2.x and 3.x interpreter versions.
There was a problem hiding this comment.
By changing the regex for the Python interpreter listings, versions of the Python 3.x interpreter newer than late-2021 should be permitted as options for the Guake drop-down terminal. The command for "python3.10" as well as commands for newer versions of Python 3 violate the rules created by the old regex (from the first commit). This second commit should enable the "ipython3" and legacy "ipython2" commands on Linux distributions that differentiate between Python 2 and Python 3 versions of the IPython interpreter. Also, on various Ubuntu versions, the "ipython3" command is the IPython command for default Python 3 interpretation.
Davidy22
left a comment
There was a problem hiding this comment.
Sorry about the late response, been busy as of late.
Few notes, you can use {x,y} notation for a range of repetitions instead of doing the two copied out repetitions of the last case, and it makes extending the regex a little more elegant too in case python ever gets into triple digit territory for the 3.x line. Also the ipython case seems to match a lot more letters than just i, is there a reason why we want to also match all these other cases like gpython and tpython?
|
This might be a simpler regex to evaluate PYTHONS = re.compile(r"^[a-z]?python(\d(\.\d+)?)?$")or PYTHONS = re.compile(r"^[a-z]?python(?:\d(?:\.\d+)?)?$")if you don't need to capture the version components. |
Please follow these steps before submitting a new Pull Request to Guake:
rebase on latest HEAD:
hack your change
to execute the code styling, checks and unit tests:
$ make style check reno-lint testdescribe your change in a slug file for automatic release note
generation, using:
and edit the created file in
releasenotes/notes/.You can see how
renoworks usingpipenv run reno --help.Please use a generic slug (eg, for translation update,
use
translation, for bugfix usebugfix,...)create new commit message
If your change is related to a GitHub issue, you can add a reference
using
#123where 123 is the ID of the issue.You can use
closes #123to have GitHub automatically close the issuewhen your contribution get merged
Semantic commit is supported (and recommended). Add one of the following
line in your commit messages:
This pull request is necessary to ensure that Python versions beginning with 3.10 are available as default shell options on the Guake terminal. Without this modification the newest Python version that would function on the Guake terminal is only Python 3.9, and Ubuntu 22.04 LTS (my host system) ships with Python 3.10 by default, causing the issue of Python 3.10 not appearing on my host system.