diff options
author | L. E. Segovia <amy@centricular.com> | 2024-10-01 17:39:15 +0000 |
---|---|---|
committer | Backport Bot <gitlab-backport-bot@gstreamer-foundation.org> | 2024-10-10 08:41:27 -0400 |
commit | 8ae0b49e9843017906254c69792910f1ecd4488e (patch) | |
tree | 778efc0b3e1b165d9b5036eb30b9249688c727d8 | |
parent | 913d6c8538a8c40ae46a4d96de45d0a6b2f0e60a (diff) |
recipe: Fix Python 3.13 compatibility
Python 3.13 adds a predefined instance variable,
`__static_attributes__`, that matches the expected syntax for build
steps' identification.
See https://docs.python.org/3.13/whatsnew/3.13.html#summary-release-highlights
Co-Authored-by: Nirbheek Chauhan <nirbheek@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1586>
-rw-r--r-- | cerbero/build/recipe.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py index 8e4d768b..2e6ea1ff 100644 --- a/cerbero/build/recipe.py +++ b/cerbero/build/recipe.py @@ -165,7 +165,9 @@ class BuildSteps(object): @classmethod def all_names(cls): - members = inspect.getmembers(cls, lambda x: isinstance(x, tuple)) + # In 3.13, __static_attributes__ is a new tuple attribute. Just ignore + # all attributes starting with __. + members = inspect.getmembers(cls, lambda x: isinstance(x, tuple) and x and not x[0].startswith('__')) return tuple(e[1][1] for e in members) |