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

Hyfetch does not run on Python 3.11.0 #35

Closed
1 task done
wushenrong opened this issue Nov 4, 2022 · 7 comments
Closed
1 task done

Hyfetch does not run on Python 3.11.0 #35

wushenrong opened this issue Nov 4, 2022 · 7 comments

Comments

@wushenrong
Copy link

Description

Python 3.11.0 has been released for a while and trying to run hyfetch using python 3.11.0 resulted in a error.

  • Does this issue still occur in the master branch? (Required if issue)

Verbose log

Traceback (most recent call last):
  File "/var/home/samgo/.pyenv/versions/3.11.0/bin/hyfetch", line 5, in <module>
    from hyfetch.main import run
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/site-packages/hyfetch/__init__.py", line 3, in <module>
    from . import main, constants
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/site-packages/hyfetch/main.py", line 15, in <module>
    from .models import Config
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/site-packages/hyfetch/models.py", line 13, in <module>
    @dataclass
     ^^^^^^^^^
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/samgo/.pyenv/versions/3.11.0/lib/python3.11/dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'hyfetch.neofetch_util.ColorAlignment'> for field color_align is not allowed: use default_factory
@hykilpikonna
Copy link
Owner

Fixed! Thanks for reporting the issue.

@glyph
Copy link

glyph commented Nov 16, 2022

@hykilpikonna Any chance you could do a new release with this? I just hit it on pipx install hyfetch.

@hykilpikonna
Copy link
Owner

@hykilpikonna Any chance you could do a new release with this? I just hit it on pipx install hyfetch.

We're currently releasing around once every month. I published the pre-release 1.4.4rc1 after the change. You can install it via pip install hyfetch==1.4.4rc1

image

Do you think I should publish 1.4.4 now? There aren't a lot of changes in the changelog yet but this fix seems to be critical...

@glyph
Copy link

glyph commented Nov 16, 2022

There aren't a lot of changes in the changelog yet but this fix seems to be critical...

Depending on how your process works, it might make more sense to yank 1.4.3 if 1.4.2 doesn't have this bug

@hykilpikonna
Copy link
Owner

There aren't a lot of changes in the changelog yet but this fix seems to be critical...

Depending on how your process works, it might make more sense to yank 1.4.3 if 1.4.2 doesn't have this bug

Since this fix adds support for python 3.11, all versions before 1.4.4 have this bug... yea maybe I should release 1.4.4 now 😭

@glyph
Copy link

glyph commented Nov 16, 2022

Oh right, I'm out here on the bleeding edge, I forgot :)

@hykilpikonna
Copy link
Owner

Oh right, I'm out here on the bleeding edge, I forgot :)

Okay just released 1.4.4

teohhanhui added a commit to teohhanhui/hyfetch that referenced this issue Jul 24, 2024
created --june pride month animation! still needs some work. first PR be kind pls :3
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

No branches or pull requests

3 participants