We were doing a check in a metaclass to ensure that Package classes weren't defining a function themselves; this check failed (erroneously) if that Package class subclassed another package class (because the check examined all superclasses and thought the definition we automatically add was an offender) (#29569)

This commit is contained in:
Peter Scheibel 2022-03-19 21:37:40 -07:00 committed by GitHub
parent 4b0cddb674
commit 26552533be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,7 +288,7 @@ def determine_variants(cls, exes, version_str):
# This function should not be overridden by subclasses,
# as it is not designed for bespoke pkg detection but rather
# on a per-platform basis
if hasattr(cls, 'platform_executables'):
if 'platform_executables' in cls.__dict__.keys():
raise PackageError("Packages should not override platform_executables")
cls.platform_executables = platform_executables