Repository: archlinux/archinstall

Issue:
archinstall crashing
Here's the traceback 

```
Traceback (most recent call last):
  File "/usr/bin/archinstall", line 5, in <module>
    from archinstall import run_as_a_module
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 5, in <module>
    from .lib import disk
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/__init__.py", line 1, in <module>
    from .device_handler import device_handler, disk_layouts
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 16, in <module>
    from .device_model import (
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_model.py", line 849, in <module>
    @dataclass
     ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1223, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1213, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'archinstall.lib.disk.device_model.Size'> for field size is not allowed: use default_factory
```


Discussion:
You're using python 3.11 archinstall requires 3.10
> You're using python 3.11 archinstall requires 3.10

I apologise if this is a bad question, but can you guide me on how to use python 3.10 instead of 3.11? 
v2.5.6 should be built against Python 3.11 so as long as the May ISO uses Py3.11 we should be good. Best option is to `pacman -Syu` atm
Ohh I wasn't aware of the upgrade on the iso


> Here's the traceback
> 
> ```
> Traceback (most recent call last):
>   File "/usr/bin/archinstall", line 5, in <module>
>     from archinstall import run_as_a_module
>   File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 5, in <module>
>     from .lib import disk
>   File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/__init__.py", line 1, in <module>
>     from .device_handler import device_handler, disk_layouts
>   File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 16, in <module>
>     from .device_model import (
>   File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_model.py", line 849, in <module>
>     @dataclass
>      ^^^^^^^^^
>   File "/usr/lib/python3.11/dataclasses.py", line 1223, in dataclass
>     return wrap(cls)
>            ^^^^^^^^^
>   File "/usr/lib/python3.11/dataclasses.py", line 1213, in wrap
>     return _process_class(cls, init, repr, eq, order, unsafe_hash,
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class
>     cls_fields.append(_get_field(cls, name, type, kw_only))
>                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field
>     raise ValueError(f'mutable default {type(f.default)} for field '
> ValueError: mutable default <class 'archinstall.lib.disk.device_model.Size'> for field size is not allowed: use default_factory
> ```

I am getting this error after building the iso directly from the build_iso script provided in the repo. Am I doing anything wrong?
Gotcha, I'll have a look qt it, I don't think it's compatible with python 3.11 just yet
> Gotcha, I'll have a look qt it, I don't think it's compatible with python 3.11 just yet

Thank you! 
> Ohh I wasn't aware of the upgrade on the iso

Just verified, it's still Python 3.10 on the ISO, so upgrading `archinstall` might cause issues. I say *might* because the entrypoint in `/usr/bin/archinstal` is version agnostic, but the way Python handles plugins and pkg_resources might cause issues anyway.

I unfortunately only have access to a weird wifi setup right now so can't get networking up and running to do `pacman -Syu` in the ISO.

But May iso contains:
 * Python 3.10
 * archinstall 2.5.5

I would say that they have to do a full upgrade to get all the hooks right.
Alright that's good, I'll run it through 3.11 over the weekend and see if I can get it to work.

Resolving patch:
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -851,7 +851,7 @@ class LsblkInfo:
 	name: str = ''
 	path: Path = Path()
 	pkname: str = ''
-	size: Size = Size(0, Unit.B)
+	size: Size = field(default_factory=lambda: Size(0, Unit.B))
 	log_sec: int = 0
 	pttype: str = ''
 	ptuuid: str = ''


Test patch: