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

MTN drop support for python 3.7 #410

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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: 2 additions & 6 deletions .azure_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ jobs:
imageName: "ubuntu-latest"
python.version: "3.8"
tox.env: py38
linux-py37:
imageName: "ubuntu-latest"
python.version: "3.7"
tox.env: py37

pool:
vmImage: $(imageName)
Expand All @@ -78,15 +74,15 @@ jobs:
displayName: 'Use Python $(python.version)'
condition: ne(variables['python.version'], 'pypy3')
- bash: |
wget -q https://downloads.python.org/pypy/pypy3.7-v7.3.7-linux64.tar.bz2 -O pypy.tar.bz2
wget -q https://downloads.python.org/pypy/pypy3.10-v7.3.12-linux64.tar.bz2 -O pypy.tar.bz2
mkdir -p pypy3
(cd pypy3; tar --strip-components=1 -xf ../pypy.tar.bz2)
mv pypy3 /opt/pypy37
/opt/pypy37/bin/pypy3 -m ensurepip
/opt/pypy37/bin/pypy3 -m pip install --upgrade pip wheel
/opt/pypy37/bin/pypy3 -m venv pypy-venv
echo "##vso[task.prependpath]pypy-venv/bin"
displayName: 'Install PyPy 3.7'
displayName: 'Install PyPy 3.10'
condition: eq(variables['python.version'], 'pypy3')
# azure-pipelines unpredictably switches between Git\bin\bash and
# Git\usr\bin\bash when running a bash script inside Windows environments.
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 3.5.0 - in development

- Drop support for python3.7. (#409)

### 3.4.1 - 2023-06-29

Expand Down
11 changes: 3 additions & 8 deletions loky/backend/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@
import multiprocessing as mp
from multiprocessing import get_context as mp_get_context
from multiprocessing.context import BaseContext
from concurrent.futures.process import _MAX_WINDOWS_WORKERS


from .process import LokyProcess, LokyInitMainProcess

# Apparently, on older Python versions, loky cannot work 61 workers on Windows
# but instead 60: ¯\_(ツ)_/¯
if sys.version_info >= (3, 8):
from concurrent.futures.process import _MAX_WINDOWS_WORKERS

if sys.version_info < (3, 10):
_MAX_WINDOWS_WORKERS = _MAX_WINDOWS_WORKERS - 1
else:
# compat for versions before 3.8 which do not define this.
_MAX_WINDOWS_WORKERS = 60
if sys.version_info < (3, 10):
_MAX_WINDOWS_WORKERS = _MAX_WINDOWS_WORKERS - 1

START_METHODS = ["loky", "loky_init_main", "spawn"]
if sys.platform != "win32":
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ def run(self):
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",
],
cmdclass=cmdclass,
platforms="any",
python_requires=">=3.7",
python_requires=">=3.8",
install_requires=["cloudpickle"],
tests_require=["packaging", "pytest", "psutil"],
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deps =
pytest-timeout
psutil ; python_version != '3.8'
coverage
viztracer ; python_version >= '3.8' and python_version <= '3.10'
viztracer ; implementation_name == 'cpython' and python_version >= '3.9' and python_version <= '3.10'
numpy ; implementation_name == 'cpython'
tblib
whitelist_externals=
Expand Down