internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: strawberry-graphql/strawberry

Issue:
Typing behavior change in strawberry 0.156.2
The `@strawberry.field` annotation behavior has changed at typing level between strawberry 0.156.1 and 0.156.2. It should now be a callable

## Describe the Bug

Consider this simple code:

```python
import strawberry


@strawberry.type
class Author:
    name: str


@strawberry.type
class Query:
    @strawberry.field
    async def get_authors(self) -> list[Author]:
        return [
            Author(name="Michael Crichton")
        ]
```

Running mypy on this is ok for strawberry 0.156.1.

On strawberry 0.156.2 this gives an error:
```txt
error: Argument 1 to "field" has incompatible type "Callable[[Query], Coroutine[Any, Any, List[Author]]]"; expected "Union[StrawberryResolver[<nothing>], Callable[..., <nothing>], Callable[..., Awaitable[<nothing>]], staticmethod[<nothing>], classmethod[<nothing>]]"  [arg-type]
```

This is probably due to the declaration of the callable on awaitable (https://github.com/strawberry-graphql/strawberry/pull/2528/files), since switching to field as this is ok:

```python
import strawberry


@strawberry.type
class Author:
    name: str


@strawberry.type
class Query:
    @strawberry.field()
    async def get_authors(self) -> list[Author]:
        return [
            Author(name="Michael Crichton")
        ]
```



Discussion:
@csuriano23, yes, sorry about that, I suspect it is a potential bug in Mypy, I did open an issue here: https://github.com/python/mypy/issues/14669

But I'll see if I can find a workaround for the time being 😊

Resolving patch:
diff --git a/strawberry/field.py b/strawberry/field.py
--- a/strawberry/field.py
+++ b/strawberry/field.py
@@ -7,6 +7,7 @@
     Any,
     Awaitable,
     Callable,
+    Coroutine,
     Dict,
     List,
     Mapping,
@@ -39,7 +40,9 @@
 _RESOLVER_TYPE = Union[
     StrawberryResolver[T],
     Callable[..., T],
-    Callable[..., Awaitable[T]],
+    # we initially used Awaitable, but that was triggering the following mypy bug:
+    # https://github.com/python/mypy/issues/14669
+    Callable[..., Coroutine[T, Any, Any]],
     "staticmethod[T]",
     "classmethod[T]",
 ]


Test patch:
diff --git a/tests/mypy/test_fields.yml b/tests/mypy/test_fields.yml
--- a/tests/mypy/test_fields.yml
+++ b/tests/mypy/test_fields.yml
@@ -110,3 +110,22 @@
     reveal_type(i.a)
   out: |
     main:14: note: Revealed type is "builtins.str"
+
+- case: test_does_not_put_fields_with_async_resolver_in_init
+  main: |
+    import strawberry
+
+    async def resolver() -> str:
+        return "hi"
+
+    @strawberry.type
+    class Example:
+        a: str = strawberry.field(description="Example")
+        b: str = strawberry.field(resolver=resolver)
+        c: str
+
+    i = Example(a="a", c="c")
+
+    reveal_type(i.a)
+  out: |
+    main:14: note: Revealed type is "builtins.str"
Repository: strawberry-graphql/strawberry

Issue:
Add a warning when using `@strawberry.federation.type` but not using `strawberry.federation.Schema`
This should make developer life easier if they forget to use the federation schema :)

See: https://discord.com/channels/689806334337482765/773519351423827978/950480727630303232


Discussion:

Resolving patch:
diff --git a/strawberry/schema/schema.py b/strawberry/schema/schema.py
--- a/strawberry/schema/schema.py
+++ b/strawberry/schema/schema.py
@@ -1,5 +1,6 @@
 from __future__ import annotations
 
+import warnings
 from functools import lru_cache
 from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Type, Union, cast
 
@@ -148,6 +149,8 @@ def __init__(
         # attach our schema to the GraphQL schema instance
         self._schema._strawberry_schema = self  # type: ignore
 
+        self._warn_for_federation_directives()
+
         # Validate schema early because we want developers to know about
         # possible issues as soon as possible
         errors = validate_schema(self._schema)
@@ -290,6 +293,25 @@ async def subscribe(
             operation_name=operation_name,
         )
 
+    def _warn_for_federation_directives(self):
+        """Raises a warning if the schema has any federation directives."""
+        from strawberry.federation.schema_directives import FederationDirective
+
+        if any(
+            type_
+            for type_ in self.schema_converter.type_map.values()
+            if any(
+                directive
+                for directive in (type_.definition.directives or [])
+                if isinstance(directive, FederationDirective)
+            )
+        ):
+            warnings.warn(
+                "Federation directive found in schema. "
+                "Should use strawberry.federation.Schema instead.",
+                UserWarning,
+            )
+
     def as_str(self) -> str:
         return print_schema(self)
 


Test patch:
diff --git a/tests/federation/test_schema.py b/tests/federation/test_schema.py
--- a/tests/federation/test_schema.py
+++ b/tests/federation/test_schema.py
@@ -1,6 +1,8 @@
 import textwrap
 from typing import Generic, List, Optional, TypeVar
 
+import pytest
+
 import strawberry
 
 
@@ -263,3 +265,23 @@ class Product:
             """
         ).strip()
     )
+
+
+def test_federation_schema_warning():
+    @strawberry.federation.type(keys=["upc"])
+    class ProductFed:
+        upc: str
+        name: Optional[str]
+        price: Optional[int]
+        weight: Optional[int]
+
+    with pytest.warns(UserWarning) as record:
+        strawberry.Schema(
+            query=ProductFed,
+        )
+
+    assert (
+        "Federation directive found in schema. "
+        "Should use strawberry.federation.Schema instead."
+        in [str(r.message) for r in record]
+    )
Repository: strawberry-graphql/strawberry

Issue:
Missing type annotation in `strawberry.fastapi.BaseContext` causes mypy to trip
## Describe the Bug

I built a custom context based on [the guide in the docs](https://strawberry.rocks/docs/guides/authentication):

```python
from strawberry.fastapi import BaseContext

class CustomContext(BaseContext):
    @property
    def user(self) -> User:
        ...

async def get_context() -> CustomContext:
    return CustomContext()
```

With that I receive the following mypy error:
```shell
 error: Call to untyped function "CustomContext" in typed context  [no-untyped-call]
```

For now, I added the following workaround to my code:
```python
class CustomContext(BaseContext):
    if typing.TYPE_CHECKING:
        def __init__(self) -> None:
            pass
    
    ...
```

## System Information

 - Operating system: macOS Monterey
 - Strawberry version (if applicable): `0.158.1`
 - FastAPI version (if applicable): `0.92.0`
 - mypy version (if applicable): `0.991` (also tested with `1.0.1`)

## Additional Context

I'm happy to provide a PR to address the issue myself.



Discussion:
@SaturnFromTitan happy to take a PR fo this 😊

Resolving patch:
diff --git a/strawberry/fastapi/context.py b/strawberry/fastapi/context.py
--- a/strawberry/fastapi/context.py
+++ b/strawberry/fastapi/context.py
@@ -14,7 +14,7 @@
 class BaseContext:
     connection_params: Optional[Any] = None
 
-    def __init__(self):
+    def __init__(self) -> None:
         self.request: Optional[Union[Request, WebSocket]] = None
         self.background_tasks: Optional[BackgroundTasks] = None
         self.response: Optional[Response] = None


Test patch:
Repository: strawberry-graphql/strawberry

Issue:
Provide better error for Union of scalars.
This keeps coming from questions on discord
```py
union: Union[List[int], List[str]]
```
gives something like
```console
  File "/root/backend/env/lib/python3.10/site-packages/strawberry/schema/name_converter.py", line 99, in from_union
    assert hasattr(type_, "_type_definition")
AssertionError

The above exception was the direct cause of the following exception:
  File "/root/backend/env/lib/python3.10/site-packages/graphql/type/definition.py", line 811, in fields
    raise cls(f"{self.name} fields cannot be resolved. {error}") from error
TypeError: Query fields cannot be resolved
```


Discussion:

Resolving patch:
diff --git a/strawberry/exceptions/invalid_union_type.py b/strawberry/exceptions/invalid_union_type.py
--- a/strawberry/exceptions/invalid_union_type.py
+++ b/strawberry/exceptions/invalid_union_type.py
@@ -33,7 +33,11 @@ def __init__(self, union_name: str, invalid_type: object) -> None:
         if isinstance(invalid_type, ScalarWrapper):
             type_name = invalid_type.wrap.__name__
         else:
-            type_name = invalid_type.__name__  # type: ignore
+            try:
+                type_name = invalid_type.__name__  # type: ignore
+            except AttributeError:
+                # might be StrawberryList instance
+                type_name = invalid_type.__class__.__name__
 
         self.message = f"Type `{type_name}` cannot be used in a GraphQL Union"
         self.rich_message = (


Test patch:
diff --git a/tests/schema/test_union.py b/tests/schema/test_union.py
--- a/tests/schema/test_union.py
+++ b/tests/schema/test_union.py
@@ -662,3 +662,37 @@ class Query:
         union: Union[Something, AnnotatedInt]
 
     strawberry.Schema(query=Query)
+
+
+@pytest.mark.raises_strawberry_exception(
+    InvalidUnionTypeError, match="Type `(.*)` cannot be used in a GraphQL Union"
+)
+@pytest.mark.parametrize(
+    "annotation",
+    (
+        "int",
+        "str",
+        "float",
+        pytest.param(
+            "list[str]",
+            marks=pytest.mark.skipif(
+                sys.version_info < (3, 9, 0),
+                reason="list[str] is only available on python 3.9+",
+            ),
+        ),
+        "List[str]",
+    ),
+)
+def test_raises_on_union_of_scalars(annotation: str, monkeypatch):
+    @strawberry.type
+    class ICanBeInUnion:
+        foo: str
+
+    monkeypatch.setitem(globals(), ICanBeInUnion.__name__, ICanBeInUnion)
+    annotation = f"Union[{ICanBeInUnion.__name__}, {annotation}]"
+
+    @strawberry.type
+    class Query:
+        union: annotation  # type: ignore
+
+    strawberry.Schema(query=Query)
Repository: strawberry-graphql/strawberry

Issue:
Compat with Mypy 1.1.1
<!-- Provide a general summary of the bug in the title above. -->

```
  File "/home/backend/.venv/lib/python3.10/site-packages/mypy/semanal.py", line 1737, in apply_class_plugin_hooks
    hook(ClassDefContext(defn, decorator, self))
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 875, in custom_dataclass_class_maker_callback
    transformer.transform()
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 563, in transform
    attributes = self.collect_attributes()
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 789, in collect_attributes
    attribute = DataclassAttribute(**params)
TypeError: DataclassAttribute.__init__() missing 1 required positional argument: 'alias'
```

`alias` was added in https://github.com/python/mypy/commit/4635a8c80f6b797c0ce3e53b909dcb4d5b175d1f.

Related #2614 

## System Information

 - Operating system:
 - Strawberry version (if applicable): latest


<!-- POLAR PLEDGE BADGE START -->
## Upvote & Fund

- We're using [Polar.sh](https://polar.sh/strawberry-graphql) so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.

<a href="https://polar.sh/strawberry-graphql/strawberry/issues/2615">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/2615/pledge.svg?darkmode=1">
  <img alt="Fund with Polar" src="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/2615/pledge.svg">
</picture>
</a>
<!-- POLAR PLEDGE BADGE END -->



Discussion:

Resolving patch:
diff --git a/strawberry/ext/mypy_plugin.py b/strawberry/ext/mypy_plugin.py
--- a/strawberry/ext/mypy_plugin.py
+++ b/strawberry/ext/mypy_plugin.py
@@ -785,6 +785,8 @@ def collect_attributes(self) -> Optional[List[DataclassAttribute]]:
                 params["info"] = cls.info
             if MypyVersion.VERSION >= Decimal("0.920"):
                 params["kw_only"] = True
+            if MypyVersion.VERSION >= Decimal("1.1"):
+                params["alias"] = None
 
             attribute = DataclassAttribute(**params)
             attrs.append(attribute)
diff --git a/strawberry/object_type.py b/strawberry/object_type.py
--- a/strawberry/object_type.py
+++ b/strawberry/object_type.py
@@ -374,7 +374,7 @@ def asdict(obj: object) -> Dict[str, object]:
     >>> # should be {"name": "Lorem", "age": 25}
     >>> user_dict = strawberry.asdict(User(name="Lorem", age=25))
     """
-    return dataclasses.asdict(obj)
+    return dataclasses.asdict(obj)  # type: ignore
 
 
 __all__ = [


Test patch:
Repository: strawberry-graphql/strawberry

Issue:
Compat with Mypy 1.2.0
In https://github.com/python/mypy/pull/14878, a new argument was added to DataclassAttribute (`is_neither_frozen_nor_nonfrozen`).

```shell
  File "/home/backend/.venv/lib/python3.10/site-packages/mypy/semanal.py", line 1743, in apply_class_plugin_hooks
    hook(ClassDefContext(defn, decorator, self))
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 878, in custom_dataclass_class_maker_callback
    transformer.transform()
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 564, in transform
    attributes = self.collect_attributes()
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 792, in collect_attributes
    attribute = DataclassAttribute(**params)
TypeError: DataclassAttribute.__init__() missing 1 required positional argument: 'is_neither_frozen_nor_nonfrozen'
```


Discussion:
working on it now :)

Resolving patch:
diff --git a/strawberry/experimental/pydantic/fields.py b/strawberry/experimental/pydantic/fields.py
--- a/strawberry/experimental/pydantic/fields.py
+++ b/strawberry/experimental/pydantic/fields.py
@@ -17,9 +17,14 @@
 try:
     from typing import GenericAlias as TypingGenericAlias  # type: ignore
 except ImportError:
-    # python < 3.9 does not have GenericAlias (list[int], tuple[str, ...] and so on)
-    TypingGenericAlias = ()
+    import sys
 
+    # python < 3.9 does not have GenericAlias (list[int], tuple[str, ...] and so on)
+    # we do this under a conditional to avoid a mypy :)
+    if sys.version_info < (3, 9):
+        TypingGenericAlias = ()
+    else:
+        raise
 
 ATTR_TO_TYPE_MAP = {
     "NoneStr": Optional[str],
diff --git a/strawberry/ext/mypy_plugin.py b/strawberry/ext/mypy_plugin.py
--- a/strawberry/ext/mypy_plugin.py
+++ b/strawberry/ext/mypy_plugin.py
@@ -788,6 +788,14 @@ def collect_attributes(self) -> Optional[List[DataclassAttribute]]:
                 params["kw_only"] = True
             if MypyVersion.VERSION >= Decimal("1.1"):
                 params["alias"] = None
+            if MypyVersion.VERSION >= Decimal("1.2"):
+                from mypy.plugins.dataclasses import (
+                    _has_direct_dataclass_transform_metaclass,
+                )
+
+                params[
+                    "is_neither_frozen_nor_nonfrozen"
+                ] = _has_direct_dataclass_transform_metaclass(cls.info)
 
             attribute = DataclassAttribute(**params)
             attrs.append(attribute)
diff --git a/strawberry/field.py b/strawberry/field.py
--- a/strawberry/field.py
+++ b/strawberry/field.py
@@ -47,8 +47,8 @@
     # we initially used Awaitable, but that was triggering the following mypy bug:
     # https://github.com/python/mypy/issues/14669
     Callable[..., Coroutine[T, Any, Any]],
-    "staticmethod[Any, T]",  # type: ignore
-    "classmethod[Any, Any, T]",  # type: ignore
+    "staticmethod[Any, T]",
+    "classmethod[Any, Any, T]",
 ]
 
 UNRESOLVED = object()


Test patch:
Repository: strawberry-graphql/strawberry

Issue:
Upgrade to latest uvicorn
A cant install latest uvicorn 0.23 with latest strawberry 0.195.2 and debug-server, just uvicorn and strawberry, without debug server, or uvicorn 0.21.3 and strawberry with debug server

## Describe the Bug

<!-- A clear and concise description of what the bug is. -->

## System Information

 - Arch Linux 
 - Strawberry version (if applicable): latest

## Additional Context

<!-- POLAR PLEDGE BADGE START -->
## Upvote & Fund

- We're using [Polar.sh](https://polar.sh/strawberry-graphql) so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.

<a href="https://polar.sh/strawberry-graphql/strawberry/issues/2956">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/2956/pledge.svg?darkmode=1">
  <img alt="Fund with Polar" src="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/2956/pledge.svg">
</picture>
</a>
<!-- POLAR PLEDGE BADGE END -->



Discussion:

Resolving patch:
diff --git a/noxfile.py b/noxfile.py
--- a/noxfile.py
+++ b/noxfile.py
@@ -18,7 +18,6 @@
     "--ignore=tests/mypy",
     "--ignore=tests/pyright",
     "--ignore=tests/cli",
-    # TODO: reintroduce this in its own test session
     "--ignore=tests/experimental/pydantic",
 ]
 
@@ -120,6 +119,7 @@ def test_pydantic(session: Session, pydantic: str) -> None:
         "--cov-report=xml",
         "-m",
         "pydantic",
+        "--ignore=tests/cli",
     )
 
 


Test patch:
Repository: strawberry-graphql/strawberry

Issue:
`ApolloTracingExtension` raises deprecation warning.
## Describe the Bug
[`datetime.utcnow` is deprecated](https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow) as of Python 3.12.

```python
  .venv/lib/python3.12/site-packages/strawberry/extensions/tracing/apollo.py:89: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    self.start_time = datetime.utcnow()

  /.venv/lib/python3.12/site-packages/strawberry/extensions/tracing/apollo.py:92: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    self.end_time = datetime.utcnow()
```

## System Information
 - Strawberry version (if applicable): 0.220


<!-- POLAR PLEDGE BADGE START -->
## Upvote & Fund

- We're using [Polar.sh](https://polar.sh/strawberry-graphql) so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.

<a href="https://polar.sh/strawberry-graphql/strawberry/issues/3409">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/3409/pledge.svg?darkmode=1">
  <img alt="Fund with Polar" src="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/3409/pledge.svg">
</picture>
</a>
<!-- POLAR PLEDGE BADGE END -->



Discussion:

Resolving patch:
diff --git a/strawberry/extensions/tracing/apollo.py b/strawberry/extensions/tracing/apollo.py
--- a/strawberry/extensions/tracing/apollo.py
+++ b/strawberry/extensions/tracing/apollo.py
@@ -2,7 +2,7 @@
 
 import dataclasses
 import time
-from datetime import datetime
+from datetime import datetime, timezone
 from inspect import isawaitable
 from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, List, Optional
 
@@ -86,10 +86,10 @@ def __init__(self, execution_context: ExecutionContext):
 
     def on_operation(self) -> Generator[None, None, None]:
         self.start_timestamp = self.now()
-        self.start_time = datetime.utcnow()
+        self.start_time = datetime.now(timezone.utc)
         yield
         self.end_timestamp = self.now()
-        self.end_time = datetime.utcnow()
+        self.end_time = datetime.now(timezone.utc)
 
     def on_parse(self) -> Generator[None, None, None]:
         self._start_parsing = self.now()


Test patch:
Repository: facebookresearch/hydra

Issue:
Investigate integrating https://pypi.org/project/towncrier/
Town crier can manage automatic change list based on news files.


Discussion:

Resolving patch:
diff --git a/hydra/__init__.py b/hydra/__init__.py
--- a/hydra/__init__.py
+++ b/hydra/__init__.py
@@ -9,7 +9,11 @@
 from .utils import HydraConfig
 from . import utils
 
+# Source of truth for Hydra's version
+__version__ = "0.1.1"
+
 __all__ = [
+    "__version__",
     "ConfigLoader",
     "MissingConfigException",
     "main",
diff --git a/hydra/main.py b/hydra/main.py
--- a/hydra/main.py
+++ b/hydra/main.py
@@ -11,7 +11,7 @@
 
 def get_args():
     parser = argparse.ArgumentParser(description="Hydra experimentation framework")
-    version = pkg_resources.require("hydra")[0].version
+    version = pkg_resources.get_distribution("hydra").version
     parser.add_argument(
         "--version", action="version", version="hydra {}".format(version)
     )
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
+import codecs
 import distutils
 import os
 import re
@@ -7,6 +8,21 @@
 
 from setuptools import setup, find_packages
 
+here = os.path.abspath(os.path.dirname(__file__))
+
+
+def read(*parts):
+    with codecs.open(os.path.join(here, *parts), "r") as fp:
+        return fp.read()
+
+
+def find_version(*file_paths):
+    version_file = read(*file_paths)
+    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
+    if version_match:
+        return version_match.group(1)
+    raise RuntimeError("Unable to find version string.")
+
 
 class CleanCommand(distutils.cmd.Command):
     """
@@ -67,7 +83,7 @@ def run(self):
     setup(
         cmdclass={"clean": CleanCommand},
         name="hydra",
-        version="0.1.0",
+        version=find_version("hydra", "__init__.py"),
         author="Omry Yadan",
         author_email="omry@fb.com",
         description="Hydra is a generic experimentation framework for scientific computing and "
@@ -87,6 +103,13 @@ def run(self):
         # Install development dependencies with
         # pip install -e .[dev]
         extras_require={
-            "dev": ["pytest", "setuptools", "coverage", "pre-commit", "nox"]
+            "dev": [
+                "pytest",
+                "setuptools",
+                "coverage",
+                "pre-commit",
+                "nox",
+                "towncrier",
+            ]
         },
     )


Test patch:
Repository: facebookresearch/hydra

Issue:
output/hydra.yaml is wrong
hydra.yaml in output directory is malformed (not rooted at hydra.)


Discussion:
run any demo and look at hydra.yaml in created output directory.

Resolving patch:
diff --git a/hydra/plugins/common/utils.py b/hydra/plugins/common/utils.py
--- a/hydra/plugins/common/utils.py
+++ b/hydra/plugins/common/utils.py
@@ -68,7 +68,8 @@ def run_job(config, task_function, verbose, job_dir_key, job_subdir_key):
         ret = JobReturn()
         ret.working_dir = working_dir
         task_cfg = copy.deepcopy(config)
-        hydra_cfg = task_cfg["hydra"]
+        # TODO: update this after https://github.com/omry/omegaconf/issues/42 is resolved
+        hydra_cfg = OmegaConf.create({"hydra": task_cfg["hydra"]});
         del task_cfg["hydra"]
         ret.cfg = task_cfg
         ret.hydra_cfg = copy.deepcopy(HydraConfig())


Test patch: