Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade default iPython to 7.34, which drops Python 3.6 #15934

Merged
merged 1 commit into from Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 5 additions & 15 deletions docs/markdown/Python/python-goals/python-repl-goal.md
Expand Up @@ -24,16 +24,12 @@ You can change IPython's version with `[ipython].version`. If you change it, Pan

```toml pants.toml
[ipython]
version = "ipython>=6.0.0"
version = "ipython>=8.0.0"
lockfile = "3rdparty/python/ipython_lock.txt"
```

If you set the `version` lower than IPython 7, then you must set `[ipython].ignore_cwd = false` to avoid Pants setting an option that did not exist in earlier IPython releases.

> ❗️ IPython does not yet work with Pantsd
>
> When using IPython, use the option `--no-pantsd` to turn off the Pants daemon, e.g. `./pants --no-pantsd repl --shell=ipython`. We are working to [fix this](https://github.com/pantsbuild/pants/issues/9939).

> 📘 Python 2 support
>
> Pants uses IPython 7 by default, which does not work with Python 2. You can override `version` to use IPython 5. As mentioned above, you must set `ignore_cwd = false`.
Expand Down Expand Up @@ -76,16 +72,10 @@ Type "help", "copyright", "credits" or "license" for more information.
This will not load any of your code:

```text Shell
$ ./pants --no-pantsd repl --shell=ipython

Python 3.6.10 (default, Feb 26 2020, 08:26:13)
Type "copyright", "credits" or "license" for more information.

IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
❯ ./pants repl --shell=ipython
Python 3.9.12 (main, Mar 26 2022, 15:45:34)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.34.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: 21 * 4
Out[1]: 84
Expand Down
120 changes: 73 additions & 47 deletions src/python/pants/backend/python/subsystems/ipython.lock
Expand Up @@ -9,7 +9,7 @@
// "CPython<4,>=3.7"
// ],
// "generated_with_requirements": [
// "ipython==7.16.1"
// "ipython<8,>=7.34"
// ]
// }
// --- END PANTS LOCKFILE METADATA ---
Expand All @@ -27,19 +27,19 @@
"artifacts": [
{
"algorithm": "sha256",
"hash": "93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442",
"url": "https://files.pythonhosted.org/packages/e4/fa/0c6c9786aa6927d12d100d322588e125e6ed466ab0a3d2d509ea18aeb56d/appnope-0.1.2-py2.py3-none-any.whl"
"hash": "265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e",
"url": "https://files.pythonhosted.org/packages/41/4a/381783f26df413dde4c70c734163d88ca0550a1361cb74a1c68f47550619/appnope-0.1.3-py2.py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a",
"url": "https://files.pythonhosted.org/packages/e9/bc/2d2c567fe5ac1924f35df879dbf529dd7e7cabd94745dc9d89024a934e76/appnope-0.1.2.tar.gz"
"hash": "02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24",
"url": "https://files.pythonhosted.org/packages/6a/cd/355842c0db33192ac0fc822e2dcae835669ef317fe56c795fb55fcddb26f/appnope-0.1.3.tar.gz"
}
],
"project_name": "appnope",
"requires_dists": [],
"requires_python": null,
"version": "0.1.2"
"version": "0.1.3"
},
{
"artifacts": [
Expand All @@ -63,19 +63,19 @@
"artifacts": [
{
"algorithm": "sha256",
"hash": "9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2",
"url": "https://files.pythonhosted.org/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl"
"hash": "854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da",
"url": "https://files.pythonhosted.org/packages/77/8b/7550e87b2d308a1b711725dfaddc19c695f8c5fa413c640b2be01662f4e6/colorama-0.4.5-py2.py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b",
"url": "https://files.pythonhosted.org/packages/1f/bb/5d3246097ab77fa083a61bd8d3d527b7ae063c7d8e8671b1cf8c4ec10cbe/colorama-0.4.4.tar.gz"
"hash": "e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4",
"url": "https://files.pythonhosted.org/packages/2b/65/24d033a9325ce42ccbfa3ca2d0866c7e89cc68e5b9d92ecaba9feef631df/colorama-0.4.5.tar.gz"
}
],
"project_name": "colorama",
"requires_dists": [],
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7",
"version": "0.4.4"
"version": "0.4.5"
},
{
"artifacts": [
Expand All @@ -99,13 +99,13 @@
"artifacts": [
{
"algorithm": "sha256",
"hash": "2dbcc8c27ca7d3cfe4fcdff7f45b27f9a8d3edfa70ff8024a71c7a8eb5f09d64",
"url": "https://files.pythonhosted.org/packages/23/6a/210816c943c9aeeb29e4e18a298f14bf0e118fe222a23e13bfcc2d41b0a4/ipython-7.16.1-py3-none-any.whl"
"hash": "c175d2440a1caff76116eb719d40538fbb316e214eda85c5515c303aacbfb23e",
"url": "https://files.pythonhosted.org/packages/7c/6a/1f1365f4bf9fcb349fcaa5b61edfcefa721aa13ff37c5631296b12fab8e5/ipython-7.34.0-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "9f4fcb31d3b2c533333893b9172264e4821c1ac91839500f31bd43f2c59b3ccf",
"url": "https://files.pythonhosted.org/packages/88/91/666a7fa24bab1396537fcd8e2b287a2d773605ad16020af81036c8c1438c/ipython-7.16.1.tar.gz"
"hash": "af3bdb46aa292bce5615b1b2ebc76c2080c5f77f54bda2ec72461317273e7cd6",
"url": "https://files.pythonhosted.org/packages/db/6c/3fcf0b8ee46656796099ac4b7b72497af5f090da3e43fd305f2a24c73915/ipython-7.34.0.tar.gz"
}
],
"project_name": "ipython",
Expand All @@ -123,7 +123,8 @@
"ipyparallel; extra == \"parallel\"",
"ipywidgets; extra == \"all\"",
"ipywidgets; extra == \"notebook\"",
"jedi>=0.10",
"jedi>=0.16",
"matplotlib-inline",
"nbconvert; extra == \"all\"",
"nbconvert; extra == \"nbconvert\"",
"nbformat; extra == \"all\"",
Expand All @@ -133,9 +134,9 @@
"nose>=0.10.1; extra == \"test\"",
"notebook; extra == \"all\"",
"notebook; extra == \"notebook\"",
"numpy>=1.14; extra == \"all\"",
"numpy>=1.14; extra == \"test\"",
"pexpect; sys_platform != \"win32\"",
"numpy>=1.17; extra == \"all\"",
"numpy>=1.17; extra == \"test\"",
"pexpect>4.3; sys_platform != \"win32\"",
"pickleshare",
"prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0",
"pygments",
Expand All @@ -150,8 +151,8 @@
"testpath; extra == \"test\"",
"traitlets>=4.2"
],
"requires_python": ">=3.6",
"version": "7.16.1"
"requires_python": ">=3.7",
"version": "7.34"
},
{
"artifacts": [
Expand Down Expand Up @@ -179,6 +180,26 @@
"requires_python": ">=3.6",
"version": "0.18.1"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c",
"url": "https://files.pythonhosted.org/packages/a6/2d/2230afd570c70074e80fd06857ba2bdc5f10c055bd9125665fe276fadb67/matplotlib_inline-0.1.3-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee",
"url": "https://files.pythonhosted.org/packages/0f/98/838f4c57f7b2679eec038ad0abefd1acaeec35e635d4d7af215acd7d1bd2/matplotlib-inline-0.1.3.tar.gz"
}
],
"project_name": "matplotlib-inline",
"requires_dists": [
"traitlets"
],
"requires_python": ">=3.5",
"version": "0.1.3"
},
{
"artifacts": [
{
Expand Down Expand Up @@ -246,21 +267,21 @@
"artifacts": [
{
"algorithm": "sha256",
"hash": "30129d870dcb0b3b6a53efdc9d0a83ea96162ffd28ffe077e94215b233dc670c",
"url": "https://files.pythonhosted.org/packages/00/e4/beb2fad0bec554a011b321d0f6b99981f9171c0b05d03a6948e45ac8a5be/prompt_toolkit-3.0.28-py3-none-any.whl"
"hash": "62291dad495e665fca0bda814e342c69952086afb0f4094d0893d357e5c78752",
"url": "https://files.pythonhosted.org/packages/3f/2d/dcb44d69f388ca2ee1a4a4d3c204ab66b36975c0d5166781eaeeff76b882/prompt_toolkit-3.0.29-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "9f1cd16b1e86c2968f2519d7fb31dd9d669916f515612c269d14e9ed52b51650",
"url": "https://files.pythonhosted.org/packages/37/34/c34c376882305c5051ed7f086daf07e68563d284015839bfb74d6e61d402/prompt_toolkit-3.0.28.tar.gz"
"hash": "bd640f60e8cecd74f0dc249713d433ace2ddc62b65ee07f96d358e0b152b6ea7",
"url": "https://files.pythonhosted.org/packages/59/68/4d80f22e889ea34f20483ae3d4ca3f8d15f15264bcfb75e52b90fb5aefa5/prompt_toolkit-3.0.29.tar.gz"
}
],
"project_name": "prompt-toolkit",
"requires_dists": [
"wcwidth"
],
"requires_python": ">=3.6.2",
"version": "3.0.28"
"version": "3.0.29"
},
{
"artifacts": [
Expand All @@ -284,31 +305,31 @@
"artifacts": [
{
"algorithm": "sha256",
"hash": "44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65",
"url": "https://files.pythonhosted.org/packages/1d/17/ed4d2df187995561b28f1073df24137cb750e12f9879d291cc8ab67c65d2/Pygments-2.11.2-py3-none-any.whl"
"hash": "dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519",
"url": "https://files.pythonhosted.org/packages/5c/8e/1d9017950034297fffa336c72e693a5b51bbf85141b24a763882cf1977b5/Pygments-2.12.0-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a",
"url": "https://files.pythonhosted.org/packages/94/9c/cb656d06950268155f46d4f6ce25d7ffc51a0da47eadf1b164bbf23b718b/Pygments-2.11.2.tar.gz"
"hash": "5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb",
"url": "https://files.pythonhosted.org/packages/59/0f/eb10576eb73b5857bc22610cdfc59e424ced4004fe7132c8f2af2cc168d3/Pygments-2.12.0.tar.gz"
}
],
"project_name": "pygments",
"requires_dists": [],
"requires_python": ">=3.5",
"version": "2.11.2"
"requires_python": ">=3.6",
"version": "2.12"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "782ef48d58982ddb49920c11a0c5c9c0b02e7d7d1c2ad0aa44e1a1e133051c96",
"url": "https://files.pythonhosted.org/packages/7c/5b/3d92b9f0f7ca1645cba48c080b54fe7d8b1033a4e5720091d1631c4266db/setuptools-60.10.0-py3-none-any.whl"
"hash": "c1848f654aea2e3526d17fc3ce6aeaa5e7e24e66e645b5be2171f3f6b4e5a178",
"url": "https://files.pythonhosted.org/packages/e9/86/b2ede1d87122a6d4da86d84cc35d0e48b4aa2476e4281d06101c772c1961/setuptools-62.6.0-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "6599055eeb23bfef457d5605d33a4d68804266e6cb430b0fb12417c5efeae36c",
"url": "https://files.pythonhosted.org/packages/af/e8/894c71e914dfbe01276a42dfad40025cd96119f2eefc39c554b6e8b9df86/setuptools-60.10.0.tar.gz"
"hash": "990a4f7861b31532871ab72331e755b5f14efbe52d336ea7f6118144dd478741",
"url": "https://files.pythonhosted.org/packages/dc/73/88920663229023b724a854d1ab7e3e50a1a28b63eeec399a604ba30f9242/setuptools-62.6.0.tar.gz"
}
],
"project_name": "setuptools",
Expand All @@ -319,6 +340,7 @@
"filelock>=3.4.0; extra == \"testing-integration\"",
"flake8-2020; extra == \"testing\"",
"furo; extra == \"docs\"",
"ini2toml[lite]>=0.9; extra == \"testing\"",
"jaraco.envs>=2.2; extra == \"testing\"",
"jaraco.envs>=2.2; extra == \"testing-integration\"",
"jaraco.packaging>=9; extra == \"docs\"",
Expand All @@ -344,36 +366,39 @@
"rst.linker>=1.9; extra == \"docs\"",
"sphinx-favicon; extra == \"docs\"",
"sphinx-inline-tabs; extra == \"docs\"",
"sphinx-reredirects; extra == \"docs\"",
"sphinx; extra == \"docs\"",
"sphinxcontrib-towncrier; extra == \"docs\"",
"tomli-w>=1.0.0; extra == \"testing\"",
"tomli; extra == \"testing-integration\"",
"virtualenv>=13.0.0; extra == \"testing\"",
"virtualenv>=13.0.0; extra == \"testing-integration\"",
"wheel; extra == \"testing\"",
"wheel; extra == \"testing-integration\""
],
"requires_python": ">=3.7",
"version": "60.10"
"version": "62.6"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033",
"url": "https://files.pythonhosted.org/packages/37/46/be8a3c030bd3673f4800fa7f46eda972dfa2990089a51ec5dd0a26ed33e9/traitlets-5.1.1-py3-none-any.whl"
"hash": "65fa18961659635933100db8ca120ef6220555286949774b9cfc106f941d1c7a",
"url": "https://files.pythonhosted.org/packages/83/a9/1059771062cb80901c34a4dea020e76269412e69300b4ba12e3356865ad8/traitlets-5.3.0-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7",
"url": "https://files.pythonhosted.org/packages/db/cf/e6cbf07ce2d21a17c8379f3f2f12db413a38da5ee20809638226b1490e48/traitlets-5.1.1.tar.gz"
"hash": "0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2",
"url": "https://files.pythonhosted.org/packages/b2/ed/3c842dbe5a8f0f1ebf3f5b74fc1a46601ed2dfe0a2d256c8488d387b14dd/traitlets-5.3.0.tar.gz"
}
],
"project_name": "traitlets",
"requires_dists": [
"pre-commit; extra == \"test\"",
"pytest; extra == \"test\""
],
"requires_python": ">=3.7",
"version": "5.1.1"
"version": "5.3"
},
{
"artifacts": [
Expand All @@ -397,16 +422,17 @@
}
],
"platform_tag": [
"cp39",
"cp39",
"cp310",
"cp310",
"macosx_11_0_arm64"
]
}
],
"pex_version": "2.1.72",
"path_mappings": {},
"pex_version": "2.1.90",
"prefer_older_binary": false,
"requirements": [
"ipython==7.16.1"
"ipython<8,>=7.34"
],
"requires_python": [
"<4,>=3.7"
Expand All @@ -415,4 +441,4 @@
"style": "universal",
"transitive": true,
"use_pep517": null
}
}
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/subsystems/ipython.py
Expand Up @@ -25,7 +25,7 @@ class IPython(PythonToolBase):
options_scope = "ipython"
help = "The IPython enhanced REPL (https://ipython.org/)."

default_version = "ipython==7.16.1" # The last version to support Python 3.6.
default_version = "ipython>=7.34,<8" # ipython 8 does not support Python 3.7.
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dropping Python 3.6 something that we'll want to cherrypick, or should the docs edit and the version bump happen separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dropped Python 3.6 support in 2.11 with #14803, so this is safe to cherry-pick.

default_main = ConsoleScript("ipython")

register_lockfile = True
Expand Down