Skip to content

Commit

Permalink
This is a change that reproduces the issue
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
junkmd committed Sep 29, 2024
1 parent 684a559 commit 41fcf55
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions comtypes/safearray.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ def _make_safearray_type(itemtype):
)

meta = type(_safearray.tagSAFEARRAY)
sa_type = meta.__new__(
meta, "SAFEARRAY_%s" % itemtype.__name__, (_safearray.tagSAFEARRAY,), {}
)
sa_type = meta(f"SAFEARRAY_{itemtype.__name__}", (_safearray.tagSAFEARRAY,), {})

try:
vartype = _ctype_to_vartype[itemtype]
Expand Down

0 comments on commit 41fcf55

Please sign in to comment.