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

restore Python 3.8 CI entries and fix a test #232

Merged
merged 3 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
26 changes: 13 additions & 13 deletions .azure_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ jobs:
strategy:
matrix:

# windows-py38:
# imageName: "vs2017-win2016"
# python.version: "3.8"
# tox.env: py38
windows-py38:
imageName: "vs2017-win2016"
python.version: "3.8"
tox.env: py38
windows-py35:
imageName: "vs2017-win2016"
python.version: "3.5"
Expand All @@ -16,10 +16,10 @@ jobs:
python.version: "2.7"
tox.env: py27

# macos-py38:
# imageName: "macos-10.13"
# python.version: "3.8"
# tox.env: py38
macos-py38:
imageName: "macos-10.13"
python.version: "3.8"
tox.env: py38
macos-py35:
imageName: "macos-10.13"
python.version: "3.5"
Expand All @@ -41,11 +41,11 @@ jobs:
python.version: "3.8"
tox.env: "py38"
joblib.tests: "true"
# linux-py38-high-memory:
# imageName: "ubuntu-16.04"
# python.version: "3.8"
# tox.env: py38
# RUN_MEMORY: "true"
linux-py38-high-memory:
imageName: "ubuntu-16.04"
python.version: "3.8"
tox.env: py38
RUN_MEMORY: "true"
linux-py37:
imageName: "ubuntu-16.04"
python.version: "3.7"
Expand Down
12 changes: 12 additions & 0 deletions tests/_test_process_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import sys
import time
import shutil
import platform
import pytest
import weakref
import tempfile
Expand Down Expand Up @@ -535,9 +536,20 @@ def test_shutdown_race_issue12456(self):
self.executor.map(str, [2] * (self.worker_count + 1))
self.executor.shutdown()


@pytest.mark.skipif(
platform.python_implementation() != "CPython" or
(sys.version_info >= (3, 8, 0) and sys.version_info < (3, 8, 2)),
reason="Underlying bug fixed upstream starting Python 3.8.2")
def test_no_stale_references(self):
# Issue #16284: check that the executors don't unnecessarily hang onto
# references.

# This test has to be skipped on early Python 3.8 versions because of a
# low-level reference cycle inside the pickle module for early versions
# of Python 3.8 preventing stale references from being collected. See
# cloudpipe/cloudpickle#327 as well as
# https://bugs.python.org/issue39492
my_object = MyObject()
collect = threading.Event()
_ = weakref.ref(my_object, lambda obj: collect.set()) # noqa
Expand Down