Update to 6.1.0
This commit is contained in:
parent
73cac2f97d
commit
26af661582
1
.gitignore
vendored
1
.gitignore
vendored
@ -42,3 +42,4 @@
|
||||
/Pillow-5.3.0.tar.gz
|
||||
/Pillow-5.4.1.tar.gz
|
||||
/Pillow-6.0.0.tar.gz
|
||||
/Pillow-6.1.0.tar.gz
|
||||
|
@ -1,132 +0,0 @@
|
||||
From 560bc337314c35c599bf75ef3f925d35dc879245 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 31 May 2019 05:55:13 -0400
|
||||
Subject: [PATCH] Pass the correct types to PyArg_ParseTuple.
|
||||
|
||||
Py_ssize_t uses the 'n' specifier, not 'i'.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
src/_imagingft.c | 2 +-
|
||||
src/encode.c | 22 +++++++++++-----------
|
||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/_imagingft.c b/src/_imagingft.c
|
||||
index 00c0c517..b604c8b2 100644
|
||||
--- a/src/_imagingft.c
|
||||
+++ b/src/_imagingft.c
|
||||
@@ -257,7 +257,7 @@ getfont(PyObject* self_, PyObject* args, PyObject* kw)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (!PyArg_ParseTupleAndKeywords(args, kw, "eti|is"PY_ARG_BYTES_LENGTH"i",
|
||||
+ if (!PyArg_ParseTupleAndKeywords(args, kw, "etn|ns"PY_ARG_BYTES_LENGTH"n",
|
||||
kwlist,
|
||||
Py_FileSystemDefaultEncoding, &filename,
|
||||
&size, &index, &encoding, &font_bytes,
|
||||
diff --git a/src/encode.c b/src/encode.c
|
||||
index 6832f90c..40fbd459 100644
|
||||
--- a/src/encode.c
|
||||
+++ b/src/encode.c
|
||||
@@ -126,7 +126,7 @@ _encode(ImagingEncoderObject* encoder, PyObject* args)
|
||||
|
||||
Py_ssize_t bufsize = 16384;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "|i", &bufsize))
|
||||
+ if (!PyArg_ParseTuple(args, "|n", &bufsize))
|
||||
return NULL;
|
||||
|
||||
buf = PyBytes_FromStringAndSize(NULL, bufsize);
|
||||
@@ -180,7 +180,7 @@ _encode_to_file(ImagingEncoderObject* encoder, PyObject* args)
|
||||
Py_ssize_t fh;
|
||||
Py_ssize_t bufsize = 16384;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "i|i", &fh, &bufsize))
|
||||
+ if (!PyArg_ParseTuple(args, "n|n", &fh, &bufsize))
|
||||
return NULL;
|
||||
|
||||
/* Allocate an encoder buffer */
|
||||
@@ -229,7 +229,7 @@ _setimage(ImagingEncoderObject* encoder, PyObject* args)
|
||||
x0 = y0 = x1 = y1 = 0;
|
||||
|
||||
/* FIXME: should publish the ImagingType descriptor */
|
||||
- if (!PyArg_ParseTuple(args, "O|(iiii)", &op, &x0, &y0, &x1, &y1))
|
||||
+ if (!PyArg_ParseTuple(args, "O|(nnnn)", &op, &x0, &y0, &x1, &y1))
|
||||
return NULL;
|
||||
im = PyImaging_AsImaging(op);
|
||||
if (!im)
|
||||
@@ -409,7 +409,7 @@ PyImaging_GifEncoderNew(PyObject* self, PyObject* args)
|
||||
char *rawmode;
|
||||
Py_ssize_t bits = 8;
|
||||
Py_ssize_t interlace = 0;
|
||||
- if (!PyArg_ParseTuple(args, "ss|ii", &mode, &rawmode, &bits, &interlace))
|
||||
+ if (!PyArg_ParseTuple(args, "ss|nn", &mode, &rawmode, &bits, &interlace))
|
||||
return NULL;
|
||||
|
||||
encoder = PyImaging_EncoderNew(sizeof(GIFENCODERSTATE));
|
||||
@@ -441,7 +441,7 @@ PyImaging_PcxEncoderNew(PyObject* self, PyObject* args)
|
||||
char *rawmode;
|
||||
Py_ssize_t bits = 8;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "ss|ii", &mode, &rawmode, &bits)) {
|
||||
+ if (!PyArg_ParseTuple(args, "ss|n", &mode, &rawmode, &bits)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ PyImaging_RawEncoderNew(PyObject* self, PyObject* args)
|
||||
Py_ssize_t stride = 0;
|
||||
Py_ssize_t ystep = 1;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "ss|ii", &mode, &rawmode, &stride, &ystep))
|
||||
+ if (!PyArg_ParseTuple(args, "ss|nn", &mode, &rawmode, &stride, &ystep))
|
||||
return NULL;
|
||||
|
||||
encoder = PyImaging_EncoderNew(0);
|
||||
@@ -506,7 +506,7 @@ PyImaging_TgaRleEncoderNew(PyObject* self, PyObject* args)
|
||||
char *rawmode;
|
||||
Py_ssize_t ystep = 1;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "ss|i", &mode, &rawmode, &ystep))
|
||||
+ if (!PyArg_ParseTuple(args, "ss|n", &mode, &rawmode, &ystep))
|
||||
return NULL;
|
||||
|
||||
encoder = PyImaging_EncoderNew(0);
|
||||
@@ -567,7 +567,7 @@ PyImaging_ZipEncoderNew(PyObject* self, PyObject* args)
|
||||
Py_ssize_t compress_type = -1;
|
||||
char* dictionary = NULL;
|
||||
Py_ssize_t dictionary_size = 0;
|
||||
- if (!PyArg_ParseTuple(args, "ss|iii"PY_ARG_BYTES_LENGTH, &mode, &rawmode,
|
||||
+ if (!PyArg_ParseTuple(args, "ss|nnn"PY_ARG_BYTES_LENGTH, &mode, &rawmode,
|
||||
&optimize,
|
||||
&compress_level, &compress_type,
|
||||
&dictionary, &dictionary_size))
|
||||
@@ -717,7 +717,7 @@ PyImaging_JpegEncoderNew(PyObject* self, PyObject* args)
|
||||
char* rawExif = NULL;
|
||||
Py_ssize_t rawExifLen = 0;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "ss|iiiiiiiiO"PY_ARG_BYTES_LENGTH""PY_ARG_BYTES_LENGTH,
|
||||
+ if (!PyArg_ParseTuple(args, "ss|nnnnnnnnO"PY_ARG_BYTES_LENGTH""PY_ARG_BYTES_LENGTH,
|
||||
&mode, &rawmode, &quality,
|
||||
&progressive, &smooth, &optimize, &streamtype,
|
||||
&xdpi, &ydpi, &subsampling, &qtables, &extra, &extra_size,
|
||||
@@ -823,7 +823,7 @@ PyImaging_LibTiffEncoderNew(PyObject* self, PyObject* args)
|
||||
PyObject *keys, *values;
|
||||
|
||||
|
||||
- if (! PyArg_ParseTuple(args, "sssisO", &mode, &rawmode, &compname, &fp, &filename, &dir)) {
|
||||
+ if (! PyArg_ParseTuple(args, "sssnsO", &mode, &rawmode, &compname, &fp, &filename, &dir)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -995,7 +995,7 @@ PyImaging_Jpeg2KEncoderNew(PyObject *self, PyObject *args)
|
||||
OPJ_CINEMA_MODE cine_mode;
|
||||
Py_ssize_t fd = -1;
|
||||
|
||||
- if (!PyArg_ParseTuple(args, "ss|OOOsOIOOOssi", &mode, &format,
|
||||
+ if (!PyArg_ParseTuple(args, "ss|OOOsOnOOOssn", &mode, &format,
|
||||
&offset, &tile_offset, &tile_size,
|
||||
&quality_mode, &quality_layers, &num_resolutions,
|
||||
&cblk_size, &precinct_size,
|
||||
--
|
||||
2.21.0
|
||||
|
@ -13,16 +13,14 @@
|
||||
%global with_docs 1
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 6.0.0
|
||||
Release: 2%{?dist}
|
||||
Version: 6.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Python image processing library
|
||||
|
||||
# License: see http://www.pythonware.com/products/pil/license.htm
|
||||
License: MIT
|
||||
URL: http://python-pillow.github.io/
|
||||
Source0: https://github.com/python-pillow/Pillow/archive/%{version}/Pillow-%{version}.tar.gz
|
||||
# Fix "SystemError: tile cannot extend outside image" on s390x (#1706450)
|
||||
Patch0001: 0001-Pass-the-correct-types-to-PyArg_ParseTuple.patch
|
||||
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: gcc
|
||||
@ -303,6 +301,9 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 01 2019 Sandro Mani <manisandro@gmail.com> - 6.1.0-1
|
||||
- Update to 6.1.0
|
||||
|
||||
* Fri May 31 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 6.0.0-2
|
||||
- Fix broken Python/C interop on s390x
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (Pillow-6.0.0.tar.gz) = c5fbe1432d576fe4a70a15fa7a70a446ccbcb247fbd4c3605917fa26a6345eb9319c0153dba7637d521c358963f2f06f525219aa1af1502da2565d54dceef4c5
|
||||
SHA512 (Pillow-6.1.0.tar.gz) = 7374691736641112480e7276b58a73851d635dc844862f70b0ecab6c6190abfbd0f54c3ecb6f246a66ed5f3e44741f3c4b52e739154e9880f385cbb116e1b537
|
||||
|
Loading…
Reference in New Issue
Block a user