Skip to content

Commit 13ba81f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into core-team
2 parents 429f153 + 347a9b0 commit 13ba81f

File tree

4 files changed

+67
-23
lines changed

4 files changed

+67
-23
lines changed

conf.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import json
2+
13
extensions = [
24
'notfound.extension',
35
'sphinx.ext.extlinks',
@@ -174,8 +176,17 @@
174176
# sphinx-notfound-page
175177
notfound_urls_prefix = "/"
176178

179+
# Dynamically expose the Python version associated with the "main" branch.
180+
# Exactly one entry in ``release-cycle.json`` should have ``"branch": "main"``.
181+
with open("include/release-cycle.json", encoding="UTF-8") as _f:
182+
_cycle = json.load(_f)
183+
184+
_main_version = next(
185+
version for version, data in _cycle.items() if data.get("branch") == "main"
186+
)
187+
177188
# prolog and epilogs
178-
rst_prolog = """
189+
rst_prolog = f"""
179190
.. |draft| replace::
180191
This is part of a **Draft** of the Python Contributor's Guide.
181192
Text in square brackets are notes about content to fill in.
@@ -192,6 +203,8 @@
192203
193204
.. _Refactoring the DevGuide: https://discuss.python.org/t/refactoring-the-devguide-into-a-contribution-guide/63409
194205
206+
.. |main_version| replace:: {_main_version}
207+
195208
"""
196209

197210
# sphinx.ext.extlinks

core-team/experts.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ __future__
5656
__main__ gvanrossum, ncoghlan
5757
_thread
5858
abc
59-
argparse serhiy-storchaka*, savannahostrowski*
59+
argparse savannahostrowski*, serhiy-storchaka*
6060
array
6161
ast benjaminp, pablogsal, isidentical, JelleZijlstra, eclips4
6262
asyncio 1st1, asvetlov, gvanrossum, graingert, kumaraditya303, willingc
@@ -103,15 +103,15 @@ encodings malemburg
103103
ensurepip ncoghlan, dstufft, pradyunsg, pfmoore
104104
enum eliben*, warsaw, ethanfurman*
105105
errno Yhg1s
106-
faulthandler vstinner, gpshead
106+
faulthandler vstinner, gpshead, ZeroIntensity*
107107
fcntl Yhg1s
108108
filecmp
109109
fileinput
110110
fnmatch serhiy-storchaka*
111111
fractions
112112
ftplib giampaolo*
113113
functools rhettinger*
114-
gc pitrou, pablogsal
114+
gc pitrou, pablogsal, nascheme
115115
getopt serhiy-storchaka*
116116
getpath FFY00
117117
getpass
@@ -241,7 +241,7 @@ uuid
241241
venv vsajip, FFY00
242242
warnings
243243
wave
244-
weakref freddrake
244+
weakref freddrake, nascheme
245245
webbrowser
246246
winreg stutzbach^
247247
winsound
@@ -343,22 +343,22 @@ io benjaminp, stutzbach^, gpshead
343343
JIT brandtbucher*, savannahostrowski*
344344
locale malemburg
345345
mathematics malemburg, stutzbach^, rhettinger, serhiy-storchaka
346-
memory management tim-one, malemburg, Yhg1s
346+
memory management tim-one, malemburg, Yhg1s, nascheme
347347
memoryview
348348
networking giampaolo, gpshead
349349
object model benjaminp, Yhg1s
350350
packaging tarekziade, malemburg, alexis^, merwok, dstufft, pfmoore
351351
pattern matching brandtbucher*
352352
PEG parser gvanrossum, pablogsal, lysnikolaou
353353
performance vstinner, serhiy-storchaka*, 1st1, rhettinger, markshannon,
354-
brandtbucher, carljm, Fidget-Spinner, AlexWaygood*
354+
brandtbucher, carljm, Fidget-Spinner, AlexWaygood*, nascheme
355355
pip ncoghlan, dstufft, pfmoore, Marcus.Smith^, pradyunsg
356356
release management tarekziade, malemburg, benjaminp, warsaw,
357357
gvanrossum, anthonybaxter^, merwok, ned-deily,
358358
birkenfeld, JulienPalard, hugovk
359-
runtime lifecycle ericsnowcurrently, kumaraditya303, zooba
359+
runtime lifecycle ericsnowcurrently, kumaraditya303, zooba, ZeroIntensity, nascheme
360360
str.format ericvsmith*
361-
subinterpreters ericsnowcurrently, kumaraditya303
361+
subinterpreters ericsnowcurrently, kumaraditya303, ZeroIntensity*
362362
symbol table JelleZijlstra, carljm
363363
testing ezio-melotti
364364
test coverage

getting-started/setup-building.rst

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,19 +1188,52 @@ select the option ``Open in VS Code``. You will still be working on the remote
11881188
codespace instance, thus using the remote instance's compute power. The compute
11891189
power may be a much higher spec than your local machine which can be helpful.
11901190

1191+
.. _devcontainer-directly:
11911192

1192-
Building the container locally
1193-
------------------------------
1193+
Using the dev container directly
1194+
================================
11941195

11951196
If you want more control over the environment, or to work offline,
1196-
you can build the container locally.
1197+
you can use the same container used in
1198+
:ref:`GitHub Codespaces <using-codespaces>` directly.
11971199
This is meant for users who have (or want to get) some experience
11981200
with containers.
1199-
The following instructions are a starting point for
1200-
your own customizations.
1201-
They assume a Unix-like environment, and Docker or Podman installed.
1201+
These instructions assume a Unix-like environment with
1202+
`Docker <https://www.docker.com/>`__ or `Podman <https://podman.io/>`__
1203+
installed.
12021204

1203-
In a clone of the `cpython-devcontainers repo <https://github.com/python/cpython-devcontainers>`_,
1205+
.. _devcontainer-image:
1206+
1207+
Using the pre-built container image
1208+
-----------------------------------
1209+
1210+
`Dev container images <https://github.com/python/cpython-devcontainers/pkgs/container/devcontainer>`__
1211+
are available from the
1212+
`GitHub Container Registry (GHCR) account for the Python org <https://github.com/orgs/python/packages>`__.
1213+
1214+
To run the container and launch a Bash shell, run one of the following commands
1215+
in a clone of the CPython repository.
1216+
1217+
.. code-block:: bash
1218+
1219+
docker run -it --rm --volume $PWD:/workspace --workdir /workspace ghcr.io/python/devcontainer:latest
1220+
1221+
.. code-block:: bash
1222+
1223+
podman run -it --rm --volume $PWD:/workspace:Z --workdir /workspace ghcr.io/python/devcontainer:latest
1224+
1225+
Note that the container has read/write access to the working directory.
1226+
You may want to use a separate clone of CPython, or run ``make clean``
1227+
to remove caches and build output generated for your host OS.
1228+
1229+
.. _building-the-container-locally
1230+
.. _devcontainer-build:
1231+
1232+
Building yourself
1233+
-----------------
1234+
1235+
If you prefer, you can build the container image yourself. In a clone of the
1236+
`cpython-devcontainers repo <https://github.com/python/cpython-devcontainers>`_,
12041237
build the container and name it ``cpython-dev``:
12051238

12061239
.. code-block:: bash
@@ -1213,8 +1246,8 @@ The same command will update any existing ``cpython-dev`` container.
12131246
Run it again from time to time -- especially if the container stops
12141247
working for you.
12151248

1216-
To run the container, run one of the following commands in a clone of the
1217-
CPython repository.
1249+
To run the container and launch a Bash shell, run one of the following commands
1250+
in a clone of the CPython repository.
12181251

12191252
.. code-block:: bash
12201253
@@ -1224,12 +1257,10 @@ CPython repository.
12241257
12251258
podman run -it --rm --volume $PWD:/workspace:Z --workdir /workspace cpython-dev
12261259
1227-
Note that the container has read/write access to the working directory.
1228-
You may want to use a separate clone of CPython, or run ``make clean``
1229-
to remove caches and build output generated for your host OS.
1260+
The same caveats outlined above when running from a container image from GHCR
1261+
also apply here.
12301262

12311263
.. c_codespaces_end
12321264
12331265
1234-
12351266
.. include:: ../links.rst

versions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Status of Python versions
66
=========================
77

8-
The ``main`` branch is currently the future Python 3.14, and is the only
8+
The ``main`` branch is currently the future Python |main_version|, and is the only
99
branch that accepts new features. The latest release for each Python
1010
version can be found on the `download page <https://www.python.org/downloads/>`_.
1111

0 commit comments

Comments
 (0)