8000 This is a change that reproduces the issue · junkmd/comtypes@41fcf55 · GitHub
[go: up one dir, main page]

Skip to content

Commit 41fcf55

Browse files
committed
This is a change that reproduces the issue
where it runs successfully on Python 3.13, but a `NameError` occurs on Python 3.11. It corresponds to an updated version of the reproducer reported at python/cpython#124520 (comment).
1 parent 684a559 commit 41fcf55

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

comtypes/safearray.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ def _make_safearray_type(itemtype):
8181
)
8282

8383
meta = type(_safearray.tagSAFEARRAY)
84-
sa_type = meta.__new__(
85-
meta, "SAFEARRAY_%s" % itemtype.__name__, (_safearray.tagSAFEARRAY,), {}
86-
)
84+
sa_type = meta(f"SAFEARRAY_{itemtype.__name__}", (_safearray.tagSAFEARRAY,), {})
8785

8886
try:
8987
vartype = _ctype_to_vartype[itemtype]

0 commit comments

Comments
 (0)
0