|
23 | 23 |
|
24 | 24 | - If there is a specific version of Python that you need and you don't want to worry about any potential breaking changes due to patch updates (going from `3.7.5` to `3.7.6` for example), you should specify the **exact major, minor, and patch version** (such as `3.7.5`):
|
25 | 25 |
|
26 |
| - ```yaml |
| 26 | +```yaml |
27 | 27 | steps:
|
28 | 28 | - uses: actions/checkout@v3
|
29 | 29 | - uses: actions/setup-python@v4
|
30 | 30 | with:
|
31 | 31 | python-version: '3.7.5'
|
32 | 32 | - run: python my_script.py
|
33 | 33 | ```
|
34 |
| - - The only downside to this is that set-up will take a little longer since the exact version will have to be downloaded if the exact version is not already installed on the runner due to more recent versions. |
35 |
| - - MSI installers are used on Windows for this, so runs will take a little longer to set up vs MacOS and Linux. |
| 34 | + - The only downside to this is that set-up will take a little longer since the exact version will have to be downloaded if the exact version is not already installed on the runner due to more recent versions. |
| 35 | + - MSI installers are used on Windows for this, so runs will take a little longer to set up vs MacOS and Linux. |
36 | 36 |
|
37 | 37 | - You can specify **only a major and minor version** if you are okay with the most recent patch version being used:
|
38 | 38 |
|
39 |
| - ```yaml |
| 39 | +```yaml |
40 | 40 | steps:
|
41 | 41 | - uses: actions/checkout@v3
|
42 | 42 | - uses: actions/setup-python@v4
|
43 | 43 | with:
|
44 | 44 | python-version: '3.7'
|
45 | 45 | - run: python my_script.py
|
46 | 46 | ```
|
47 |
| - - There will be a single patch version already installed on each runner for every minor version of Python that is supported. |
48 |
| - - The patch version that will be preinstalled, will generally be the latest and every time there is a new patch released, the older version that is preinstalled will be replaced. |
49 |
| - - Using the most recent patch version will result in a very quick setup since no downloads will be required since a locally installed version of Python on the runner will be used. |
| 47 | + - There will be a single patch version already installed on each runner for every minor version of Python that is supported. |
| 48 | + - The patch version that will be preinstalled, will generally be the latest and every time there is a new patch released, the older version that is preinstalled will be replaced. |
| 49 | + - Using the most recent patch version will result in a very quick setup since no downloads will be required since a locally installed version of Python on the runner will be used. |
50 | 50 |
|
51 | 51 | - You can specify the version with **prerelease tag** to download and set up an accurate pre-release version of Python:
|
52 | 52 |
|
|
0 commit comments