Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Disable old python versions for macOS latest runner #341

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-20.04]
python-version: [3.6, 3.8, 3.11, pypy-3.7]
python-version: [3.8, 3.11]
include:
- os: ubuntu-20.04
python-version: 3.6
- os: ubuntu-20.04
python-version: pypy-3.7
- os: macos-latest
python-version: pypy-3.10
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
Expand Down
12 changes: 8 additions & 4 deletions stone/backends/python_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,12 @@ def _generate_custom_annotation_processors(self, ns, data_type, extra_annotation
dt, _, _ = unwrap(data_type)
if is_struct_type(dt) or is_union_type(dt):
annotation_types_seen = set()
# If data type enumerates subtypes, recurse to subtypes instead which in turn collect parents' custom annotations
# If data type enumerates subtypes, recurse to subtypes instead which in turn collect
# parents' custom annotations
if is_struct_type(dt) and dt.has_enumerated_subtypes():
for subtype in dt.get_enumerated_subtypes():
for annotation_type, recursive_processor in self._generate_custom_annotation_processors(ns, subtype.data_type):
for annotation_type, recursive_processor in \
self._generate_custom_annotation_processors(ns, subtype.data_type):
if annotation_type not in annotation_types_seen:
yield (annotation_type, recursive_processor)
annotation_types_seen.add(annotation_type)
Expand All @@ -653,8 +655,10 @@ def _generate_custom_annotation_processors(self, ns, data_type, extra_annotation
yield (annotation.annotation_type,
generate_func_call(
'bb.make_struct_annotation_processor',
args=[class_name_for_annotation_type(annotation.annotation_type, ns),
'processor']
args=[
class_name_for_annotation_type(
annotation.annotation_type, ns),
'processor']
))
annotation_types_seen.add(annotation.annotation_type)
elif is_list_type(dt):
Expand Down
Loading