@@ -20,13 +20,6 @@ the Pythons provided by the CPython release team for download from
2020the `python.org website  <https://www.python.org/downloads/ >`_. See
2121:ref: `alternative_bundles ` for some other options.
2222
23- .. |usemac_x_dot_y | replace :: 3.13 
24- .. |usemac_python_x_dot_y_literal | replace :: ``python3.13 `` 
25- .. |usemac_python_x_dot_y_t_literal | replace :: ``python3.13t `` 
26- .. |usemac_python_x_dot_y_t_literal_config | replace :: ``python3.13t-config `` 
27- .. |usemac_applications_folder_name | replace :: ``Python 3.13 `` 
28- .. |usemac_applications_folder_version | replace :: ``/Applications/Python 3.13/ `` 
29- 
3023.. _getting-osx :
3124.. _getting-and-installing-macpython :
3225
@@ -64,7 +57,7 @@ Clicking on the **Continue** button brings up the **Read Me** for this installer
6457Besides other important information, the **Read Me ** documents which Python version is
6558going to be installed and on what versions of macOS it is supported. You may need
6659to scroll through to read the whole file. By default, this **Read Me ** will also be
67- installed in |usemac_applications_folder_version | and available to read anytime.
60+ installed in |applications_python_version_literal | and available to read anytime.
6861
6962.. image :: mac_installer_02_readme.png 
7063
@@ -83,7 +76,7 @@ display. For most uses, the standard set of installation operations is appropria
8376By pressing the **Customize ** button, you can choose to omit or select certain package
8477components of the installer. Click on each package name to see a description of
8578what it installs.
86- To also install support for the optional experimental  free-threaded feature,
79+ To also install support for the optional free-threaded feature,
8780see :ref: `install-freethreaded-macos `.
8881
8982.. image :: mac_installer_05_custom_install.png 
@@ -97,7 +90,7 @@ When the installation is complete, the **Summary** window will appear.
9790.. image :: mac_installer_06_summary.png 
9891
9992Double-click on the :command: `Install Certificates.command `
100- icon or file in the |usemac_applications_folder_version | window to complete the
93+ icon or file in the |applications_python_version_literal | window to complete the
10194installation.
10295
10396.. image :: mac_installer_07_applications.png 
@@ -114,7 +107,7 @@ Close this terminal window and the installer window.
114107
115108A default install will include:
116109
117- * A |usemac_applications_folder_name | folder in your :file: `Applications ` folder. In here
110+ * A |python_version_literal | folder in your :file: `Applications ` folder. In here
118111  you find :program: `IDLE `, the development environment that is a standard part of official
119112  Python distributions; and :program: `Python Launcher `, which handles double-clicking Python
120113  scripts from the macOS `Finder  <https://support.apple.com/en-us/HT201732 >`_.
@@ -141,7 +134,7 @@ How to run a Python script
141134
142135There are two ways to invoke the Python interpreter.
143136If you are familiar with using a Unix shell in a terminal
144- window, you can invoke |usemac_python_x_dot_y_literal | or ``python3 `` optionally
137+ window, you can invoke |python_x_dot_y_literal | or ``python3 `` optionally
145138followed by one or more command line options (described in :ref: `using-on-general `).
146139The Python tutorial also has a useful section on
147140:ref: `using Python interactively from a shell  <tut-interac >`.
@@ -160,7 +153,7 @@ for more information.
160153To run a Python script file from the terminal window, you can
161154invoke the interpreter with the name of the script file:
162155
163-     |usemac_python_x_dot_y_literal | ``myscript.py ``
156+     |python_x_dot_y_literal | ``myscript.py ``
164157
165158To run your script from the Finder, you can either:
166159
@@ -259,20 +252,20 @@ Advanced Topics
259252Installing Free-threaded Binaries
260253--------------------------------- 
261254
262- .. versionadded :: 3.13 (Experimental) 
263- 
264- .. note ::
265- 
266-    Everything described in this section is considered experimental,
267-    and should be expected to change in future releases.
255+ .. versionadded :: 3.13 
268256
269257The ``python.org `` :ref: `Python for macOS  <getting-and-installing-macpython >`
270258installer package can optionally install an additional build of
271- Python |usemac_x_dot_y | that supports :pep: `703 `, the experimental  free-threading feature
259+ Python |version | that supports :pep: `703 `, the free-threading feature
272260(running with the :term: `global interpreter lock ` disabled).
273261Check the release page on ``python.org `` for possible updated information.
274262
275- Because this feature is still considered experimental, the support for it
263+ The free-threaded mode is working and continues to be improved, but
264+ there is some additional overhead in single-threaded workloads compared
265+ to the regular build. Additionally, third-party packages, in particular ones
266+ with an :term: `extension module `, may not be ready for use in a
267+ free-threaded build, and will re-enable the :term: `GIL `.
268+ Therefore, the support for free-threading
276269is not installed by default. It is packaged as a separate install option,
277270available by clicking the **Customize ** button on the **Installation Type **
278271step of the installer as described above.
@@ -282,46 +275,54 @@ step of the installer as described above.
282275If the box next to the **Free-threaded Python ** package name is checked,
283276a separate :file: `PythonT.framework ` will also be installed
284277alongside the normal :file: `Python.framework ` in :file: `/Library/Frameworks `.
285- This configuration allows a free-threaded Python |usemac_x_dot_y | build to co-exist
286- on your system with a traditional (GIL only) Python |usemac_x_dot_y | build with
287- minimal risk while installing or testing. This installation layout is itself 
288- experimental and is subject to  change in future releases.
278+ This configuration allows a free-threaded Python |version | build to co-exist
279+ on your system with a traditional (GIL only) Python |version | build with
280+ minimal risk while installing or testing. This installation layout may 
281+ change in future releases.
289282
290283Known cautions and limitations:
291284
292285- The **UNIX command-line tools ** package, which is selected by default,
293-   will install links in :file: `/usr/local/bin ` for |usemac_python_x_dot_y_t_literal |,
294-   the free-threaded interpreter, and |usemac_python_x_dot_y_t_literal_config |,
286+   will install links in :file: `/usr/local/bin ` for |python_x_dot_y_t_literal |,
287+   the free-threaded interpreter, and |python_x_dot_y_t_literal_config |,
295288  a configuration utility which may be useful for package builders.
296289  Since :file: `/usr/local/bin ` is typically included in your shell ``PATH ``,
297290  in most cases no changes to your ``PATH `` environment variables should
298-   be needed to use |usemac_python_x_dot_y_t_literal |.
291+   be needed to use |python_x_dot_y_t_literal |.
299292
300293- For this release, the **Shell profile updater ** package and the
301-   :file: `Update Shell Profile.command ` in |usemac_applications_folder_version |
294+   :file: `Update Shell Profile.command ` in |applications_python_version_literal |
302295  do not support the free-threaded package.
303296
304297- The free-threaded build and the traditional build have separate search
305298  paths and separate :file: `site-packages ` directories so, by default,
306299  if you need a package available in both builds, it may need to be installed in both.
307300  The free-threaded package will install a separate instance of :program: `pip ` for use
308-   with |usemac_python_x_dot_y_t_literal |.
301+   with |python_x_dot_y_t_literal |.
309302
310303  - To install a package using :command: `pip ` without a :command: `venv `:
311304
312-         |usemac_python_x_dot_y_t_literal | ``-m pip install <package_name> ``
305+     .. parsed-literal ::
306+ 
307+        python\  |version |\  t -m pip install <package_name> 
313308
314309
315310  to :ref: `create and use virtual environments  <tut-venv >`.
316311  This can avoid possible command name conflicts and confusion about which Python is in use:
317312
318-       |usemac_python_x_dot_y_t_literal | ``-m venv <venv_name> ``
313+   .. parsed-literal ::
314+ 
315+      python\  |version |\  t -m venv <venv_name> 
316+ 
319317
320318:command: `activate `.
321319
322320- To run a free-threaded version of IDLE:
323321
324-       |usemac_python_x_dot_y_t_literal | ``-m idlelib ``
322+   .. parsed-literal ::
323+ 
324+      python\  |version |\  t -m idlelib 
325+ 
325326
326327
327328  :ref: `PYTHON environment variables  <using-on-envvars >`
@@ -337,28 +338,28 @@ Known cautions and limitations:
337338  thus it only needs to be run once.
338339
339340- If you cannot depend on the link in ``/usr/local/bin `` pointing to the
340-   ``python.org `` free-threaded |usemac_python_x_dot_y_t_literal | (for example, if you want
341+   ``python.org `` free-threaded |python_x_dot_y_t_literal | (for example, if you want
341342  to install your own version there or some other distribution does),
342343  you can explicitly set your shell ``PATH `` environment variable to
343344  include the ``PythonT `` framework ``bin `` directory:
344345
345-   .. code-block ::  sh 
346+   .. parsed-literal :: 
346347
347-      export  PATH=" /Library/Frameworks/PythonT.framework/Versions/3.13 /bin" " $PATH "  
348+      export PATH="/Library/Frameworks/PythonT.framework/Versions/\  | version | \  /bin":"$PATH" 
348349
349350
350351  except for :file: `Python.framework `. Be aware that having both framework ``bin ``
351352  directories in ``PATH `` can lead to confusion if there are duplicate names
352-   like `` python3.13 ``  in both; which one is actually used depends on the order
353+   like | python_x_dot_y_literal |  in both; which one is actually used depends on the order
353354  they appear in ``PATH ``. The ``which python3.x `` or ``which python3.xt ``
354355  commands can show which path is being used. Using virtual environments
355356  can help avoid such ambiguities. Another option might be to create
356357  a shell :command: `alias ` to the desired interpreter, like:
357358
358-   .. code-block ::  sh 
359+   .. parsed-literal :: 
359360
360-      alias  py3.13 =" /Library/Frameworks/Python.framework/Versions/3.13 /bin/python3.13 "  
361-      alias  py3.13t =" /Library/Frameworks/PythonT.framework/Versions/3.13 /bin/python3.13t "  
361+      alias py \  | version | \  ="/Library/Frameworks/Python.framework/Versions/\  | version | \  /bin/python \  | version | \  " 
362+      alias py \  | version | \  t ="/Library/Frameworks/PythonT.framework/Versions/\  | version | \  /bin/python \  | version | \  t " 
362363
363364
364365--------------------------------- 
@@ -369,22 +370,22 @@ the macOS command line :command:`installer` utility lets you select non-default
369370options, too. If you are not familiar with :command: `installer `, it can be
370371somewhat cryptic (see :command: `man installer ` for more information).
371372As an example, the following shell snippet shows one way to do it,
372- using the `` 3.13.0b2 ``  release and selecting the free-threaded interpreter
373+ using the | x_dot_y_b2_literal |  release and selecting the free-threaded interpreter
373374option:
374375
375- ..   code-block ::  sh 
376+ .. parsed-literal :: 
376377
377-     RELEASE=" python-3.13. 0b2-macos11.pkg"  
378+     RELEASE="python-\  | version | \  0b2-macos11.pkg" 
378379
379380    # download installer pkg 
380-     curl -O https://www.python.org/ftp/python/3.13 .0/${RELEASE}  
381+     curl -O \ h\  | version | \  .0/${RELEASE} 
381382
382383    # create installer choicechanges to customize the install: 
383-     #     enable the PythonTFramework-3.13  package 
384+     #    enable the PythonTFramework-\  | version | \   package 
384385    #    while accepting the other defaults (install all other packages) 
385386    cat > ./choicechanges.plist <<EOF 
386387    <?xml version="1.0" encoding="UTF-8"?> 
387-     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
388+     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "\ h 
388389    <plist version="1.0"> 
389390    <array> 
390391            <dict> 
@@ -393,7 +394,7 @@ option:
393394                    <key>choiceAttribute</key> 
394395                    <string>selected</string> 
395396                    <key>choiceIdentifier</key> 
396-                     <string>org.python.Python.PythonTFramework-3.13 </string> 
397+                     <string>org.python.Python.PythonTFramework-\  | version | \  </string> 
397398            </dict> 
398399    </array> 
399400    </plist> 
@@ -404,19 +405,19 @@ option:
404405
405406
406407
407- ..  code-block:: console  
408+ .. parsed-literal :: 
408409
409410    $ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled 
410-     $ /usr/local/bin/python3.13t  -VV 
411-     Python 3.13. 0b2 experimental  free-threading build (v3.13 .0b2:3a83b172af, Jun  5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)] 
411+     $ /usr/local/bin/python \  | version | \  t  -VV 
412+     Python \  | version | \  . 0b2 free-threading build (v \  | version | \  .0b2:3a83b172af, Jun  5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)] 
412413    $ #    and the traditional interpreter 
413-     $ /usr/local/bin/python3.13  -VV 
414-     Python 3.13. 0b2 (v3.13 .0b2:3a83b172af, Jun  5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)] 
414+     $ /usr/local/bin/python \  | version | \   -VV 
415+     Python \  | version | \  . 0b2 (v \  | version | \  .0b2:3a83b172af, Jun  5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)] 
415416    $ # test that they are also available without the prefix if /usr/local/bin is on $PATH 
416-     $ python3.13t  -VV 
417-     Python 3.13. 0b2 experimental  free-threading build (v3.13 .0b2:3a83b172af, Jun  5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)] 
418-     $ python3.13  -VV 
419-     Python 3.13. 0b2 (v3.13 .0b2:3a83b172af, Jun  5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)] 
417+     $ python \  | version | \  t  -VV 
418+     Python \  | version | \  . 0b2 free-threading build (v \  | version | \  .0b2:3a83b172af, Jun  5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)] 
419+     $ python \  | version | \   -VV 
420+     Python \  | version | \  . 0b2 (v \  | version | \  .0b2:3a83b172af, Jun  5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)] 
420421
421422note ::
422423
0 commit comments