Bump Pillow to 10.1.* (#10897)

This commit is contained in:
Avasam
2023-10-16 17:34:45 -04:00
committed by GitHub
parent 5e13bc08e1
commit f99e8b0615
12 changed files with 24 additions and 18 deletions

View File

@@ -27,9 +27,3 @@ PIL.XVThumbImagePlugin.r
# Forwarded arguments
PIL\.TiffImagePlugin\.IFDRational\.__[a-z]+__
# Already removed in the 10.0.x branch, but still present in 10.0.0
PIL.Image.MEDIANCUT
PIL.Image.MAXCOVERAGE
PIL.Image.FASTOCTREE
PIL.Image.LIBIMAGEQUANT

View File

@@ -1,2 +0,0 @@
# Loop variables leaked in global scope
PIL.EpsImagePlugin.binary

View File

@@ -1,6 +1,5 @@
version = "10.0.*"
version = "10.1.*"
upstream_repository = "https://github.com/python-pillow/Pillow"
partial_stub = true
[tool.stubtest]
stubtest_requirements = ["olefile"]

View File

@@ -9,8 +9,10 @@ from .ImageFile import ImageFile
split: Incomplete
field: Incomplete
if sys.platform == "win32":
gs_windows_binary: Literal["gswin32c", "gswin64c", "gs", False]
gs_binary: Literal["gswin32c", "gswin64c", "gs", False, None]
gs_windows_binary: Literal["gswin32c", "gswin64c", "gs", False, None]
else:
gs_binary: Literal["gs", False, None]
gs_windows_binary: None
def has_ghostscript(): ...
@@ -28,7 +30,6 @@ class EpsImageFile(ImageFile):
format_description: ClassVar[str]
mode_map: Incomplete
im: Incomplete
mode: Incomplete
tile: Incomplete
def load(self, scale: int = 1, transparency: bool = False) -> _PixelAccessor: ...
def load_seek(self, *args, **kwargs) -> None: ...

View File

@@ -34,5 +34,4 @@ class IcnsImageFile(ImageFile):
def size(self, value) -> None: ...
best_size: Incomplete
im: Incomplete
mode: Incomplete
def load(self) -> _PixelAccessor: ...

View File

@@ -23,6 +23,5 @@ class IcoImageFile(ImageFile):
@size.setter
def size(self, value) -> None: ...
im: Incomplete
mode: Incomplete
def load(self) -> _PixelAccessor: ...
def load_seek(self) -> None: ...

View File

@@ -124,6 +124,12 @@ class Quantize(IntEnum):
FASTOCTREE: Literal[2]
LIBIMAGEQUANT: Literal[3]
# All Quantize items
MEDIANCUT: Literal[0]
MAXCOVERAGE: Literal[1]
FASTOCTREE: Literal[2]
LIBIMAGEQUANT: Literal[3]
ID: list[str]
OPEN: dict[str, Any]
MIME: dict[str, str]
@@ -161,7 +167,6 @@ class Image:
format: ClassVar[str | None]
format_description: ClassVar[str | None]
im: Incomplete
mode: _Mode
palette: Incomplete
info: dict[Incomplete, Incomplete]
readonly: int
@@ -176,6 +181,8 @@ class Image:
def height(self) -> int: ...
@property
def size(self) -> tuple[int, int]: ...
@property
def mode(self) -> _Mode: ...
def __enter__(self) -> Self: ...
def __exit__(self, *args: Unused) -> None: ...
def close(self) -> None: ...
@@ -219,6 +226,8 @@ class Image:
def get_child_images(self) -> list[Image]: ...
def getim(self): ...
def getpalette(self, rawmode: str | None = "RGB") -> list[int] | None: ...
@property
def has_transparency_data(self) -> bool: ...
def apply_transparency(self) -> None: ...
def getpixel(self, xy: tuple[int, int]): ...
def getprojection(self) -> tuple[list[int], list[int]]: ...

View File

@@ -99,6 +99,8 @@ class ImageDraw:
stroke_width: int = 0,
stroke_fill: _Ink | None = None,
embedded_color: bool = False,
*,
font_size: int | None = None,
) -> None: ...
def textlength(
self,
@@ -108,6 +110,8 @@ class ImageDraw:
features: Sequence[str] | None = None,
language: str | None = None,
embedded_color: bool = False,
*,
font_size: int | None = None,
) -> float: ...
def textbbox(
self,
@@ -122,6 +126,8 @@ class ImageDraw:
language: str | None = None,
stroke_width: int = 0,
embedded_color: bool = False,
*,
font_size: int | None = None,
) -> tuple[int, int, int, int]: ...
def multiline_textbbox(
self,
@@ -136,6 +142,8 @@ class ImageDraw:
language: str | None = None,
stroke_width: int = 0,
embedded_color: bool = False,
*,
font_size: int | None = None,
) -> tuple[int, int, int, int]: ...
def Draw(im: Image, mode: str | None = None) -> ImageDraw: ...

View File

@@ -111,4 +111,4 @@ def truetype(
layout_engine: Layout | None = None,
) -> FreeTypeFont: ...
def load_path(filename: str | bytes) -> ImageFont: ...
def load_default() -> ImageFont: ...
def load_default(size: int | None = None) -> ImageFont: ...

View File

@@ -24,6 +24,7 @@ def colorize(
midpoint: int = 127,
) -> Image: ...
def contain(image: Image, size: _Size, method: Resampling | _Resample = ...) -> Image: ...
def cover(image: Image, size: _Size, method: Resampling | _Resample = ...) -> Image: ...
def pad(
image: Image,
size: _Size,

View File

@@ -16,7 +16,6 @@ class JpegImageFile(ImageFile):
format: ClassVar[Literal["JPEG", "MPO"]]
format_description: ClassVar[str]
def load_read(self, read_bytes): ...
mode: Incomplete
tile: Incomplete
decoderconfig: Incomplete
def draft(self, mode, size): ...

View File

@@ -9,7 +9,6 @@ MODES: Incomplete
class PsdImageFile(ImageFile):
format: ClassVar[Literal["PSD"]]
format_description: ClassVar[str]
mode: Incomplete
tile: Incomplete
frame: Incomplete
fp: Incomplete