Skip to content

Commit 1d0599c

Browse files
authored
Make changes resulting in drop of python3.9 in favor of python3.13 (#203)
* Make changes resulting in drop of python3.9 in favor of python3.13 * Bump pillow version to fix tests * Exclude cyclone and tempest upgrade in 'test_dicts' on linux * Skip test 'test_dicts' on linux * Use old image with python 3.11
1 parent 0670f4b commit 1d0599c

File tree

12 files changed

+1252
-1067
lines changed

12 files changed

+1252
-1067
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
# Docker image version, see https://hub.docker.com/r/burnysc2/python-sc2-docker/tags
2525
# This version should always lack behind one version behind the docker-ci.yml because it is possible that it doesn't exist
2626
VERSION_NUMBER: '1.0.2'
27+
# TODO Change to '3.13' when a new image has been pushed
2728
LATEST_PYTHON_VERSION: '3.11'
2829
LATEST_SC2_VERSION: '4.10'
2930

@@ -136,8 +137,9 @@ jobs:
136137
# If all type annotations were removed, this library should run in py3.6 and perhaps even 3.5
137138
# Python 3.7 support has been dropped due to missing cached_property (new since Python 3.8) https://docs.python.org/3/library/functools.html#functools.cached_property
138139
# Python 3.8 support has been dropped because numpy >=1.26.0 requires Python >=3.9 (this numpy version is required to run python 3.12)
140+
# Python 3.9 support has been dropped since numpy >=2.1.0 (this numpy version is required to run python 3.13)
139141
os: [macos-latest, windows-latest, ubuntu-latest]
140-
python-version: ['3.9', '3.10', '3.11', '3.12']
142+
python-version: ['3.10', '3.11', '3.12', '3.13']
141143

142144
steps:
143145
- uses: actions/checkout@v3
@@ -200,7 +202,8 @@ jobs:
200202
fail-fast: false
201203
matrix:
202204
os: [ubuntu-latest]
203-
python-version: ['3.9', '3.10', '3.11']
205+
# TODO Add '3.12' and '3.13' when a new image has been pushed
206+
python-version: ['3.10', '3.11']
204207
sc2-version: ['4.10']
205208
env:
206209
IMAGE_NAME: burnysc2/python-sc2:local
@@ -309,7 +312,7 @@ jobs:
309312
# docker rm -f my_container
310313

311314
run_coverage:
312-
# Run and upload coverage report using python 3.9
315+
# Run and upload coverage report
313316
# This coverage test does not cover the whole testing range, check /bat_files/rune_code_coverage.bat
314317
name: Run coverage
315318
needs: [run_test_bots, run_example_bots]

.github/workflows/docker-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ on:
1212
- develop
1313

1414
env:
15-
VERSION_NUMBER: '1.0.3'
16-
LATEST_PYTHON_VERSION: '3.11'
15+
VERSION_NUMBER: '1.0.4'
16+
LATEST_PYTHON_VERSION: '3.12'
1717
LATEST_SC2_VERSION: '4.10'
18-
EXPERIMENTAL_PYTHON_VERSION: '3.12'
18+
EXPERIMENTAL_PYTHON_VERSION: '3.13'
1919

2020
jobs:
2121
run_test_docker_image:
@@ -75,7 +75,7 @@ jobs:
7575
fail-fast: false
7676
matrix:
7777
os: [ubuntu-latest]
78-
python-version: ['3.9', '3.10', '3.11', '3.12']
78+
python-version: ['3.10', '3.11', '3.12', '3.13']
7979
sc2-version: ['4.10']
8080
env:
8181
IMAGE_NAME: burnysc2/python-sc2-docker:py_${{ matrix.python-version }}-sc2_${{ matrix.sc2-version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For a list of ongoing changes and differences to the main repository of Dentosal
1818

1919
By installing this library you agree to be bound by the terms of the [AI and Machine Learning License](http://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html).
2020

21-
For this fork, you'll need Python 3.9 or newer.
21+
For this fork, you'll need Python 3.10 or newer.
2222

2323
Install the pypi package:
2424
```

dockerfiles/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Set up StarCraft II Test Environment for python-sc2 bots (not pysc2 bots!)
2-
ARG PYTHON_VERSION=3.9
2+
ARG PYTHON_VERSION=3.10
33

44
# Use an official debian stretch slim release as a base image
55
FROM python:$PYTHON_VERSION-slim

dockerfiles/test_docker_image.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e
77

88
# Set which versions to use
99
export VERSION_NUMBER=${VERSION_NUMBER:-0.9.9}
10-
export PYTHON_VERSION=${PYTHON_VERSION:-3.10}
10+
export PYTHON_VERSION=${PYTHON_VERSION:-3.12}
1111
export SC2_VERSION=${SC2_VERSION:-4.10}
1212

1313
# For better readability, set local variables
@@ -36,8 +36,7 @@ docker rm -f test_container
3636
# https://docs.docker.com/storage/bind-mounts/#use-a-read-only-bind-mount
3737
docker run -i -d \
3838
--name test_container \
39-
--mount type=bind,source="$(pwd)",destination=/root/python-sc2,readonly \
40-
--entrypoint /bin/bash \
39+
--volume ./:/root/python-sc2:ro \
4140
$IMAGE_NAME
4241

4342
# Install python-sc2, via mount the python-sc2 folder will be available

dockerfiles/test_new_python_candidate.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -e
88

99
# Set which versions to use
1010
export VERSION_NUMBER=${VERSION_NUMBER:-0.9.9}
11-
export PYTHON_VERSION=${PYTHON_VERSION:-3.12}
11+
export PYTHON_VERSION=${PYTHON_VERSION:-3.13}
1212
export SC2_VERSION=${SC2_VERSION:-4.10}
1313

1414
# For better readability, set local variables
@@ -25,8 +25,7 @@ docker rm -f test_container
2525
# https://docs.docker.com/storage/bind-mounts/#use-a-read-only-bind-mount
2626
docker run -i -d \
2727
--name test_container \
28-
--mount type=bind,source="$(pwd)",destination=/root/python-sc2,readonly \
29-
--entrypoint /bin/bash \
28+
--volume ./:/root/python-sc2:ro \
3029
$IMAGE_NAME
3130

3231

docs_generate/text_files/docker.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Requirements
1212

1313
Pulling the Docker image
1414
------------------------
15-
The SC2 AI community has decided to stay on Python3.9 for a while. I'll try to update the docker image as soon as a new linux binary is released, or create a pull request at https://github.com/BurnySc2/python-sc2-docker ::
15+
The SC2 AI community has decided to stay on Python3.10 for a while. I'll try to update the docker image as soon as a new linux binary is released, or create a pull request at https://github.com/BurnySc2/python-sc2-docker ::
1616

17-
docker pull burnysc2/python-sc2-docker:release-python_3.9-sc2_4.10_arenaclient_burny
17+
docker pull burnysc2/python-sc2-docker:release-python_3.10-sc2_4.10_arenaclient_burny
1818

1919
Deleting previous containers
2020
-----------------------------
@@ -26,7 +26,7 @@ Launching a new container
2626
--------------------------
2727
The following command launches a new container in interactive mode, which means it will not shut down once it is done running::
2828

29-
docker run -it -d --name app burnysc2/python-sc2-docker:release-python_3.9-sc2_4.10_arenaclient_burny
29+
docker run -it -d --name app burnysc2/python-sc2-docker:release-python_3.10-sc2_4.10_arenaclient_burny
3030

3131
Install bot requirements
3232
-------------------------

docs_generate/text_files/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is an overview to the BurnySc2/python-sc2 library which can be found here:
66

77
Requirements
88
-------------
9-
- Python 3.9 or newer
9+
- Python 3.10 or newer
1010
- StarCraft 2 Client installation in the **default installation path** which should be ``C:\Program Files (x86)\StarCraft II``
1111

1212
Installation

0 commit comments

Comments
 (0)