nebius/SWE-bench-extra huggingface dataset:
Repository: kodemore/kink

Issue:
cannot alias a factory service with inject
`inject` cannot find services which are both aliased and factoried.  For example:

    class Repository: ...

    @inject(alias=Repository, use_factory=True)
    class PerInstanceRepository(Repository): ...

    @inject
    class Service:
       def __init__(self, repository: Repository): ...

`Container.__getitem__` looks for factory services before resolving aliases.  However, factories are not referenced again after aliases are resolved.

Comments:

Patch:
diff --git a/README.md b/README.md
index 8bacef6..630ffd7 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ No need for manual work and manual dependency management. Give it a try and you
 To fully utilise the potential of kink it is recommended to bootstrap your initial dependencies
 (config values, or instances of classes that are standalone, requires no other dependencies than themselves).
 Some people prefer to keep it in `__init__.py` in the top module of your application, other
-create separate `bootstra.py` file for this purpose. Once all is setup the only step left 
+create separate `bootstrap.py` file for this purpose. Once all is setup the only step left 
 is to decorate your classes/functions with `@inject` decorator.
 
 ## Bootstrapping/Adding services manually
diff --git a/kink/container.py b/kink/container.py
index caa1171..d0a24d1 100644
--- a/kink/container.py
+++ b/kink/container.py
@@ -38,7 +38,10 @@ class Container:
             return service
 
         if key in self._aliases:
-            service = self._get(self._aliases[key][0])  # By default return first aliased service
+            unaliased_key = self._aliases[key][0] # By default return first aliased service
+            if unaliased_key in self._factories:
+                return self._factories[unaliased_key](self)
+            service = self._get(unaliased_key)  
 
         if service is not _MISSING_SERVICE:
             return service


Test patch:
diff --git a/tests/test_issue_aliased_factory.py b/tests/test_issue_aliased_factory.py
new file mode 100644
index 0000000..54105f7
--- /dev/null
+++ b/tests/test_issue_aliased_factory.py
@@ -0,0 +1,17 @@
+
+from kink import inject, di
+
+class Repository:
+   pass
+
+@inject(alias=Repository, use_factory=True)
+class PerInstanceRepository(Repository):
+   pass
+
+@inject
+class Service:
+   def __init__(self, repository: Repository):
+      pass
+   
+def test_can_inject_aliased_factory_services():
+   di[Service]
\ No newline at end of file
Repository: konradhalas/dacite

Issue:
Incorrect work when using field with default_factory
**Describe the bug**
`default_factory` is called only once if a field absent in the data

**To Reproduce**
```python
#!/usr/bin/env python

from dataclasses import field, dataclass

from dacite import from_dict


@dataclass
class A:
    name: str
    items: list[str] = field(default_factory=list)


if __name__ == '__main__':
    a1 = from_dict(A, {'name': 'a1'})
    a2 = from_dict(A, {'name': 'a2'})
    print('Test identity:', a1.items is a2.items)
```
**Output**
```
Test identity: True
```

**Expected behavior**
`items` shouldn't be identical.
`dacite v1.7.0` works as expected
```
Test identity: False
```

**Environment**
- Python version: 3.9.16
- `dacite` version: 1.8.0



Comments:

Patch:
diff --git a/dacite/dataclasses.py b/dacite/dataclasses.py
index d70f423..c06ddc0 100644
--- a/dacite/dataclasses.py
+++ b/dacite/dataclasses.py
@@ -11,7 +11,6 @@ class DefaultValueNotFoundError(Exception):
     pass
 
 
-@cache
 def get_default_value_for_field(field: Field, type_: Type) -> Any:
     if field.default != MISSING:
         return field.default


Test patch:
diff --git a/tests/core/test_base.py b/tests/core/test_base.py
index 8d82788..a866d57 100644
--- a/tests/core/test_base.py
+++ b/tests/core/test_base.py
@@ -1,5 +1,5 @@
 from dataclasses import dataclass, field
-from typing import Any, NewType, Optional
+from typing import Any, NewType, Optional, List
 
 import pytest
 
@@ -191,3 +191,16 @@ def test_from_dict_with_new_type():
     result = from_dict(X, {"s": "test"})
 
     assert result == X(s=MyStr("test"))
+
+
+def test_dataclass_default_factory_identity():
+    # https://github.com/konradhalas/dacite/issues/215
+    @dataclass
+    class A:
+        name: str
+        items: List[str] = field(default_factory=list)
+
+    a1 = from_dict(A, {"name": "a1"})
+    a2 = from_dict(A, {"name": "a2"})
+
+    assert a1.items is not a2.items