Skip to content

Update stix2extensions to version 2.2.0#498

Merged
fqrious merged 1 commit into
mainfrom
fqrious-patch-2
Apr 17, 2026
Merged

Update stix2extensions to version 2.2.0#498
fqrious merged 1 commit into
mainfrom
fqrious-patch-2

Conversation

@fqrious
Copy link
Copy Markdown
Contributor

@fqrious fqrious commented Apr 17, 2026

Upgrade stix2extensions from version 2.1.3 to 2.2.0.

Upgrade stix2extensions from version 2.1.3 to 2.2.0.
@fqrious fqrious merged commit d05b666 into main Apr 17, 2026
1 check failed
@fqrious fqrious deleted the fqrious-patch-2 branch April 17, 2026 08:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
309 1 308 0
View the top 1 failed test(s) by shortest run time
../../../../../opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/schemathesis/generation/hypothesis/builder.py::test_api[GET /api/v1/feeds/{feed_id}/rss/]
Stack Traces | 20.4s run time
kwargs = {}

    @wraps(test_function)
>   def test_wrapper(*args: Any, **kwargs: Any) -> Any:
               ^^^^^^^^^^^

.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../generation/hypothesis/builder.py:280: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../site-packages/schemathesis/schemas.py:362: in test_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
tests/st/test_schemathesis.py:54: in test_api
    case.call_and_validate(excluded_checks=[negative_data_rejection, positive_data_acceptance])
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../schemathesis/generation/case.py:380: in call
    response = transport_.send(
tests/utils.py:55: in send
    response: DRFResponse = client.generic(**serialized_request)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../django/test/client.py:671: in generic
    return self.request(**r)
           ^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../django/test/client.py:1087: in request
    self.check_exception(response)
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../django/test/client.py:802: in check_exception
    raise exc_value
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../core/handlers/exception.py:55: in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../views/decorators/csrf.py:65: in _view_wrapper
    return view_func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../site-packages/rest_framework/viewsets.py:125: in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11............/site-packages/rest_framework/views.py:515: in dispatch
    response = self.handle_exception(exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11............/site-packages/rest_framework/views.py:475: in handle_exception
    self.raise_uncaught_exception(exc)
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11............/site-packages/rest_framework/views.py:486: in raise_uncaught_exception
    raise exc
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11............/site-packages/rest_framework/views.py:512: in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../history4feed/app/views.py:595: in rss
    queryset = self.filter_queryset(self.get_queryset())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../site-packages/rest_framework/generics.py:154: in filter_queryset
    queryset = backend().filter_queryset(self.request, queryset, self)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../django_filters/rest_framework/backends.py:72: in filter_queryset
    return filterset.qs
           ^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11....../site-packages/django_filters/filterset.py:250: in qs
    qs = self.filter_queryset(qs)
         ^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11....../site-packages/django_filters/filterset.py:233: in filter_queryset
    queryset = self.filters[name].filter(queryset, value)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../site-packages/django_filters/filters.py:167: in filter
    qs = self.get_method(qs)(**{lookup: value})
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../db/models/query.py:1495: in filter
    return self._filter_or_exclude(False, args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../db/models/query.py:1513: in _filter_or_exclude
    clone._filter_or_exclude_inplace(negate, args, kwargs)
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../db/models/query.py:1523: in _filter_or_exclude_inplace
    self._query.add_q(Q(*args, **kwargs))
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../models/sql/query.py:1648: in add_q
    clause, _ = self._add_q(q_object, can_reuse)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../models/sql/query.py:1680: in _add_q
    child_clause, needed_inner = self.build_filter(
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../models/sql/query.py:1528: in build_filter
    lookups, parts, reffed_expression = self.solve_lookup_type(arg, summarize)
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../models/sql/query.py:1335: in solve_lookup_type
    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <django.db.models.sql.query.Query object at 0x7f0092da1e90>
names = ['threat_score', 'gte'], opts = <Options for Post>, allow_many = True
fail_on_missing = False

    def names_to_path(self, names, opts, allow_many=True, fail_on_missing=False):
        """
        Walk the list of names and turns them into PathInfo tuples. A single
        name in 'names' can generate multiple PathInfos (m2m, for example).
    
        'names' is the path of names to travel, 'opts' is the model Options we
        start the name resolving from, 'allow_many' is as for setup_joins().
        If fail_on_missing is set to True, then a name that can't be resolved
        will generate a FieldError.
    
        Return a list of PathInfo tuples. In addition return the final field
        (the last used join field) and target (which is a field guaranteed to
        contain the same value as the final field). Finally, return those names
        that weren't found (which are likely transforms and the final lookup).
        """
        path, names_with_path = [], []
        for pos, name in enumerate(names):
            cur_names_with_path = (name, [])
            if name == "pk" and opts is not None:
                name = opts.pk.name
    
            field = None
            filtered_relation = None
            try:
                if opts is None:
                    raise FieldDoesNotExist
                field = opts.get_field(name)
            except FieldDoesNotExist:
                if name in self.annotation_select:
                    field = self.annotation_select[name].output_field
                elif name in self._filtered_relations and pos == 0:
                    filtered_relation = self._filtered_relations[name]
                    if LOOKUP_SEP in filtered_relation.relation_name:
                        parts = filtered_relation.relation_name.split(LOOKUP_SEP)
                        filtered_relation_path, field, _, _ = self.names_to_path(
                            parts,
                            opts,
                            allow_many,
                            fail_on_missing,
                        )
                        path.extend(filtered_relation_path[:-1])
                    else:
                        field = opts.get_field(filtered_relation.relation_name)
            if field is not None:
                # Fields that contain one-to-many relations with a generic
                # model (like a GenericForeignKey) cannot generate reverse
                # relations and therefore cannot be used for reverse querying.
                if field.is_relation and not field.related_model:
                    raise FieldError(
                        "Field %r does not generate an automatic reverse "
                        "relation and therefore cannot be used for reverse "
                        "querying. If it is a GenericForeignKey, consider "
                        "adding a GenericRelation." % name
                    )
                try:
                    model = field.model._meta.concrete_model
                except AttributeError:
                    # QuerySet.annotate() may introduce fields that aren't
                    # attached to a model.
                    model = None
            else:
                # We didn't find the current field, so move position back
                # one step.
                pos -= 1
                if pos == -1 or fail_on_missing:
                    available = sorted(
                        [
                            *get_field_names_from_opts(opts),
                            *self.annotation_select,
                            *self._filtered_relations,
                        ]
                    )
>                   raise FieldError(
                        "Cannot resolve keyword '%s' into field. "
                        "Choices are: %s" % (name, ", ".join(available))
                    )
E                   django.core.exceptions.FieldError: Cannot resolve keyword 'threat_score' into field. Choices are: added_manually, author, categories, content_type, datetime_added, datetime_updated, deleted_manually, description, feed, feed_id, fulltext_jobs, id, is_full_text, job_state, last_job_id, link, obstracts_post, pubdate, title
E                   
E                   Reproduce with:
E                   
E                       curl -X GET 'http://localhost:.../feeds/6ca6ce37-1c69-4a81-8490-89c91b57e557/rss/?link=https%3A%2F%2FA.COM&min_confidence=0.0'
E                   
E                   You can reproduce this example by temporarily adding @reproduce_failure('6.152.1', b'AXicc2RwZHZkgEFGEAcIGB0ZGh0dQTSLBgMMAABr+wQE') as a decorator on your test case

.../hostedtoolcache/Python/3.11.15..................................................................................../x64/lib/python3.11.../models/sql/query.py:1813: FieldError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant