Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] - Python 3.9 compatibility #4234

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8"]
python-version: ["3.6", "3.7", "3.8", "3.9"]

steps:
- name: Checkout source
Expand All @@ -33,10 +33,10 @@ jobs:
- name: Install tornado
shell: bash -l {0}
run: |
if [[ "${{ matrix.python-version }}" = "3.8" ]]; then
conda install -c conda-forge tornado=6
else
if [[ "${{ matrix.python-version }}" = "3.6" ]]; then
conda install -c conda-forge tornado=5
else
conda install -c conda-forge tornado=6
fi

- name: Install distributed from source
Expand Down
8 changes: 7 additions & 1 deletion distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import html
import json
import logging
import multiprocessing
import multiprocessing # noqa: F401
import os
import re
import shutil
Expand Down Expand Up @@ -71,6 +71,12 @@


def _initialize_mp_context():
import multiprocessing # noqa: F401

if not WINDOWS:
# For some reason this is required in python >= 3.9
import multiprocessing.popen_spawn_posix

if WINDOWS or PYPY:
return multiprocessing
else:
Expand Down