Skip to content

Commit

Permalink
Add support for Python 3.11 (#11407)
Browse files Browse the repository at this point in the history
* Add Python 3.11 to CI

* 3.11 in the install scripts

* ${{ format('{0}.0-alpha - {0}.X', matrix.python) }}

* bump chiavdf and chiabip158 for releases with 3.11 wheels

* also bump blspy and clvm-tools-rs

* drop the extra .X for the python setup version

* chia_rs==0.1.13

* Update install.sh

* pyinstaller==5.5

* less mutable defaults

* memory_profiler

* assert sqlite3.threadsafety >= 1

* create tasks for stopping services

(cherry picked from commit 3384714f2e3e0bdc8c3d3741027e9e4fb69a6002)

* psutil==5.9.4

* drop memory_profiler transitive dep since it now supports 3.11

* drop redundant pre-release python getting incantation

* watchdog==2.2.0

* black for py311
  • Loading branch information
altendky committed Jan 27, 2023
1 parent 22dfc83 commit 523a5d4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_wheel_availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
matrix: arm
- name: Intel
matrix: intel
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
exclude:
- os:
matrix: macos
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ jobs:
matrix: '3.10'
exclude_from:
limited: True
- name: '3.11'
file_name: '3.11'
action: '3.11'
apt: '3.11'
install_sh: '3.11'
matrix: '3.11'
exclude_from:
limited: True
exclude:
- os:
matrix: macos
Expand Down
2 changes: 1 addition & 1 deletion Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
Exit 1
}

$supportedPythonVersions = "3.10", "3.9", "3.8", "3.7"
$supportedPythonVersions = "3.11", "3.10", "3.9", "3.8", "3.7"
if ("$env:INSTALL_PYTHON_VERSION" -ne "")
{
$pythonVersion = $env:INSTALL_PYTHON_VERSION
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ OPENSSL_VERSION_INT=
find_python() {
set +e
unset BEST_VERSION
for V in 310 3.10 39 3.9 38 3.8 37 3.7 3; do
for V in 311 3.11 310 3.10 39 3.9 38 3.8 37 3.7 3; do
if command -v python$V >/dev/null; then
if [ "$BEST_VERSION" = "" ]; then
BEST_VERSION=$V
Expand Down Expand Up @@ -284,8 +284,8 @@ if ! command -v "$INSTALL_PYTHON_PATH" >/dev/null; then
exit 1
fi

if [ "$PYTHON_MAJOR_VER" -ne "3" ] || [ "$PYTHON_MINOR_VER" -lt "7" ] || [ "$PYTHON_MINOR_VER" -ge "11" ]; then
echo "Chia requires Python version >= 3.7 and < 3.11.0" >&2
if [ "$PYTHON_MAJOR_VER" -ne "3" ] || [ "$PYTHON_MINOR_VER" -lt "7" ] || [ "$PYTHON_MINOR_VER" -ge "12" ]; then
echo "Chia requires Python version >= 3.7 and < 3.12.0" >&2
echo "Current Python version = $INSTALL_PYTHON_VERSION" >&2
# If Arch, direct to Arch Wiki
if type pacman >/dev/null 2>&1 && [ -f "/etc/arch-release" ]; then
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local_scheme = "no-local-version"

[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310']
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
include = '''
^/(
[^/]*.py
Expand Down

0 comments on commit 523a5d4

Please sign in to comment.