Merge pull request #4980 from nulano/3.10

GHA: Add 3.10-dev
This commit is contained in:
Andrew Murray 2020-11-02 21:02:35 +11:00 committed by GitHub
commit 3a5c336a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 8 deletions

View File

@ -31,7 +31,8 @@ python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install pyroma
python3 -m pip install test-image-results
python3 -m pip install numpy
# TODO Remove condition when numpy supports 3.10
if ! [ "$GHA_PYTHON_VERSION" == "3.10-dev" ]; then python3 -m pip install numpy ; fi
# TODO Remove when 3.8 / 3.9 / PyPy3 includes setuptools 49.3.2+:
if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi

View File

@ -13,7 +13,8 @@ python3 -m pip install pyroma
python3 -m pip install test-image-results
echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg
python3 -m pip install numpy
# TODO Remove condition when numpy supports 3.10
if ! [ "$GHA_PYTHON_VERSION" == "3.10-dev" ]; then python3 -m pip install numpy ; fi
# TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+:
if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi

View File

@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10-dev", "pypy3"]
architecture: ["x86", "x64"]
include:
- architecture: "x86"
@ -182,14 +182,16 @@ jobs:
- name: Build wheel
id: wheel
if: "github.event_name == 'push'"
# Skip wheels on 3.10 due to https://github.com/pypa/wheel/issues/354
if: "github.event_name == 'push' && !contains(matrix.python-version, '3.10')"
run: |
for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a
winbuild\\build\\build_pillow.cmd --disable-imagequant bdist_wheel
shell: cmd
- uses: actions/upload-artifact@v2
if: "github.event_name == 'push'"
# Skip wheels on 3.10 due to https://github.com/pypa/wheel/issues/354
if: "github.event_name == 'push' && !contains(matrix.python-version, '3.10')"
with:
name: ${{ steps.wheel.outputs.dist }}
path: dist\*.whl

View File

@ -14,6 +14,7 @@ jobs:
]
python-version: [
"pypy3",
"3.10-dev",
"3.9",
"3.8",
"3.7",

View File

@ -22,7 +22,7 @@
* See the README file for information on usage and redistribution.
*/
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "libImaging/Imaging.h"
@ -196,7 +196,7 @@ static PyObject*
_frombytes(ImagingDisplayObject* display, PyObject* args)
{
char* ptr;
int bytes;
Py_ssize_t bytes;
if (!PyArg_ParseTuple(args, "y#:frombytes", &ptr, &bytes)) {
return NULL;
@ -777,7 +777,7 @@ PyImaging_DrawWmf(PyObject* self, PyObject* args)
char* ptr;
char* data;
int datasize;
Py_ssize_t datasize;
int width, height;
int x0, y0, x1, y1;
if (!PyArg_ParseTuple(args, "y#(ii)(iiii):_load", &data, &datasize,