Skip to content

Commit

Permalink
chore: Upgrade the base runtime version (CPython: 3.11.6 -> 3.11.8) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Apr 8, 2024
1 parent 48552a2 commit 0ce1fa2
Show file tree
Hide file tree
Showing 16 changed files with 603 additions and 526 deletions.
1 change: 1 addition & 0 deletions changes/1995.deps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade the base CPython runtime version (3.11.6 -> 3.11.8)
20 changes: 10 additions & 10 deletions docs/dev/daily-workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ you should also configure ``PYTHONPATH`` to include the repository root's ``src`
For linters and formatters, configure the tool executable paths to indicate
``dist/export/python/virtualenvs/RESOLVE_NAME/PYTHON_VERSION/bin/EXECUTABLE``.
For example, ruff's executable path is
``dist/export/python/virtualenvs/ruff/3.11.6/bin/ruff``.
``dist/export/python/virtualenvs/ruff/3.11.8/bin/ruff``.

Currently we have the following Python tools to configure in this way:

Expand Down Expand Up @@ -259,7 +259,7 @@ Set the workspace settings for the Python extension for code navigation and auto
* - ``python.analysis.autoSearchPaths``
- true
* - ``python.analysis.extraPaths``
- ``["dist/export/python/virtualenvs/python-default/3.11.6/lib/python3.11/site-packages"]``
- ``["dist/export/python/virtualenvs/python-default/3.11.8/lib/python3.11/site-packages"]``
* - ``python.analysis.importFormat``
- ``"relative"``
* - ``editor.formatOnSave``
Expand All @@ -275,11 +275,11 @@ Set the following keys in the workspace settings to configure Python tools:
* - Setting ID
- Example value
* - ``mypy-type-checker.interpreter``
- ``["dist/export/python/virtualenvs/mypy/3.11.6/bin/python"]``
- ``["dist/export/python/virtualenvs/mypy/3.11.8/bin/python"]``
* - ``mypy-type-checker.importStrategy``
- ``"fromEnvironment"``
* - ``ruff.interpreter``
- ``["dist/export/python/virtualenvs/ruff/3.11.6/bin/python"]``
- ``["dist/export/python/virtualenvs/ruff/3.11.8/bin/python"]``
* - ``ruff.importStrategy``
- ``"fromEnvironment"``

Expand Down Expand Up @@ -309,8 +309,8 @@ Then put the followings in ``.vimrc`` (or ``.nvimrc`` for NeoVim) in the build r
.. code-block:: vim
let s:cwd = getcwd()
let g:ale_python_mypy_executable = s:cwd . '/dist/export/python/virtualenvs/mypy/3.11.6/bin/mypy'
let g:ale_python_ruff_executable = s:cwd . '/dist/export/python/virtualenvs/ruff/3.11.6/bin/ruff'
let g:ale_python_mypy_executable = s:cwd . '/dist/export/python/virtualenvs/mypy/3.11.8/bin/mypy'
let g:ale_python_ruff_executable = s:cwd . '/dist/export/python/virtualenvs/ruff/3.11.8/bin/ruff'
let g:ale_linters = { "python": ['ruff', 'mypy'] }
let g:ale_fixers = {'python': ['ruff']}
let g:ale_fix_on_save = 1
Expand All @@ -328,11 +328,11 @@ just like VSCode (see `the official reference <https://www.npmjs.com/package/coc
"ruff.enabled": true,
"ruff.autoFixOnSave": true,
"ruff.useDetectRuffCommand": false,
"ruff.builtin.pythonPath": "dist/export/python/virtualenvs/ruff/3.11.6/bin/python",
"ruff.serverPath": "dist/export/python/virtualenvs/ruff/3.11.6/bin/ruff-lsp",
"python.pythonPath": "dist/export/python/virtualenvs/python-default/3.11.6/bin/python",
"ruff.builtin.pythonPath": "dist/export/python/virtualenvs/ruff/3.11.8/bin/python",
"ruff.serverPath": "dist/export/python/virtualenvs/ruff/3.11.8/bin/ruff-lsp",
"python.pythonPath": "dist/export/python/virtualenvs/python-default/3.11.8/bin/python",
"python.linting.mypyEnabled": true,
"python.linting.mypyPath": "dist/export/python/virtualenvs/mypy/3.11.6/bin/mypy",
"python.linting.mypyPath": "dist/export/python/virtualenvs/mypy/3.11.8/bin/mypy",
}
To activate Ruff (a Python linter and fixer), run ``:CocCommand ruff.builtin.installServer``
Expand Down
3 changes: 1 addition & 2 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enable_resolves = true
# * Let other developers do:
# - Run `./pants export` again
# - Update their local IDE/editor's interpreter path configurations
interpreter_constraints = ["CPython==3.11.6"]
interpreter_constraints = ["CPython==3.11.8"]
tailor_pex_binary_targets = false

[python-bootstrap]
Expand Down Expand Up @@ -92,7 +92,6 @@ towncrier = "tools/towncrier.lock"

[black]
install_from_resolve = "black"
interpreter_constraints = ["CPython==3.11.6"] # don't know why this is required... (maybe a Pants bug?)

[ruff]
install_from_resolve = "ruff"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
requires-python = "~=3.11.6"
requires-python = "~=3.11.8"

[tool.towncrier]
package = "ai.backend.manager" # reference point for getting __version__
Expand Down Expand Up @@ -105,5 +105,5 @@ implicit_optional = true # FIXME: remove after adding https://github.com/haunts
mypy_path = "stubs:src:tools/pants-plugins"
namespace_packages = true
explicit_package_bases = true
python_executable = "dist/export/python/virtualenvs/python-default/3.11.6/bin/python"
python_executable = "dist/export/python/virtualenvs/python-default/3.11.8/bin/python"
disable_error_code = ["typeddict-unknown-key"]
240 changes: 115 additions & 125 deletions python-kernel.lock

Large diffs are not rendered by default.

0 comments on commit 0ce1fa2

Please sign in to comment.