Skip to content

Commit ae6e261

Browse files
authored
Bump reportlab to 4.2.2 (#12227)
1 parent 9fcaf3f commit ae6e261

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

stubs/reportlab/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "4.2.0"
1+
version = "4.2.2"
22
# GitHub mirror of https://hg.reportlab.com/hg-public/reportlab/file
33
upstream_repository = "https://github.com/MrBitBucket/reportlab-mirror"
44

stubs/reportlab/reportlab/lib/rl_safe_eval.pyi

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
import ast
22
import math
3+
import re
34
import time
45
from _typeshed import Incomplete
56
from collections.abc import Generator
67
from typing import NoReturn
78

8-
eval_debug: Incomplete
9-
strTypes: Incomplete
10-
isPy39: Incomplete
11-
haveNameConstant: Incomplete
9+
eval_debug: int
10+
strTypes: tuple[type[bytes], type[str]]
11+
isPy39: bool
12+
isPy313: bool
13+
haveNameConstant: bool
1214

1315
class BadCode(ValueError): ...
1416

15-
augOps: Incomplete
16-
__allowed_magic_methods__: Incomplete
17-
__rl_unsafe__: Incomplete
18-
__rl_unsafe_re__: Incomplete
17+
augOps: dict[ast.operator, str]
18+
__allowed_magic_methods__: frozenset[str]
19+
__rl_unsafe__: frozenset[str]
20+
__rl_unsafe_re__: re.Pattern[str]
1921

2022
def copy_locations(new_node, old_node) -> None: ...
2123

@@ -175,7 +177,12 @@ class __RL_SAFE_ENV__:
175177
real_bi: Incomplete
176178
bi_replace: Incomplete
177179
__rl_builtins__: Incomplete
178-
def __init__(self, timeout: Incomplete | None = None, allowed_magic_methods: Incomplete | None = None) -> None: ...
180+
def __init__(
181+
self,
182+
timeout: Incomplete | None = None,
183+
allowed_magic_methods: Incomplete | None = None,
184+
allowed_magic_names: Incomplete | None = None,
185+
) -> None: ...
179186
def __rl_type__(self, *args): ...
180187
def __rl_check__(self) -> None: ...
181188
def __rl_sd__(self, obj): ...
@@ -194,10 +201,10 @@ class __RL_SAFE_ENV__:
194201
def __rl_reversed__(self, seq): ...
195202
def __rl_range__(self, start, *args): ...
196203
def __rl_set__(self, it): ...
197-
def __rl_frozenset__(self, it): ...
204+
def __rl_frozenset__(self, it=()): ...
198205
def __rl_iter_unpack_sequence__(self, it, spec, _getiter_) -> Generator[Incomplete, None, None]: ...
199206
def __rl_unpack_sequence__(self, it, spec, _getiter_): ...
200-
def __rl_is_allowed_name__(self, name) -> None: ...
207+
def __rl_is_allowed_name__(self, name, crash: bool = True) -> bool: ...
201208
def __rl_getattr__(self, obj, a, *args): ...
202209
def __rl_getitem__(self, obj, a): ...
203210
__rl_tmax__: int
@@ -229,6 +236,7 @@ class __RL_SAFE_ENV__:
229236
timeout: Incomplete | None = None,
230237
allowed_magic_methods: Incomplete | None = None,
231238
__frame_depth__: int = 3,
239+
allowed_magic_names: Incomplete | None = None,
232240
): ...
233241

234242
class __rl_safe_eval__:
@@ -242,6 +250,7 @@ class __rl_safe_eval__:
242250
l: Incomplete | None = None,
243251
timeout: Incomplete | None = None,
244252
allowed_magic_methods: Incomplete | None = None,
253+
allowed_magic_names: Incomplete | None = None,
245254
): ...
246255

247256
class __rl_safe_exec__(__rl_safe_eval__):
@@ -251,3 +260,6 @@ def rl_extended_literal_eval(expr, safe_callables: Incomplete | None = None, saf
251260

252261
rl_safe_exec: __rl_safe_exec__
253262
rl_safe_eval: __rl_safe_eval__
263+
264+
def __fix_set__(value, default=...): ...
265+
def rl_less_safe_eval(expr, NS): ...

stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,3 +625,9 @@ class PDFRadialShading(PDFShading):
625625
otherkw: Incomplete
626626
def __init__(self, x0, y0, r0, x1, y1, r1, Function, ColorSpace, **kw) -> None: ...
627627
def Dict(self, document): ...
628+
629+
class XMP(PDFStream):
630+
def __init__(self, path: Incomplete | None = None, creator: Incomplete | None = None) -> None: ...
631+
def makeContent(self, doc): ...
632+
# Param name is changed from the base class:
633+
def format(self, doc): ...

0 commit comments

Comments
 (0)