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

GHA: Add 3.10-dev #4980

Merged
merged 5 commits into from
Nov 2, 2020
Merged
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
3 changes: 2 additions & 1 deletion .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test-windows.yml
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", "3.9", "pypy3"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10-dev", "pypy3"]
architecture: ["x86", "x64"]
include:
- architecture: "x86"
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
]
python-version: [
"pypy3",
"3.10-dev",
"3.9",
"3.8",
"3.7",
Expand Down
6 changes: 3 additions & 3 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -777,7 +777,7 @@ PyImaging_DrawWmf(PyObject* self, PyObject* args)
char* ptr;

char* data;
int datasize;
Py_ssize_t datasize;
radarhere marked this conversation as resolved.
Show resolved Hide resolved
int width, height;
int x0, y0, x1, y1;
if (!PyArg_ParseTuple(args, "y#(ii)(iiii):_load", &data, &datasize,
Expand Down