Repository: qtile/qtile

Issue:
Qtile loggin with default config
Hi today when i loggin in my arch linux with qtile, opened with default config. i see another post with similar problem but dont work. This is the log of qtile:

```
2021-02-22 13:35:55,667 WARNING libqtile lifecycle.py:_atexit():L38 Qtile will now terminate
2021-02-22 13:36:01,032 WARNING libqtile floating.py:__init__():L109 Non-config.Match objects in float_rules are deprecated
2021-02-22 13:36:01,032 ERROR libqtile confreader.py:load():L106 Could not import config file '/home/sailentk/.config/qtile/config.py'
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError
2021-02-22 13:36:01,033 ERROR libqtile manager.py:load_config():L107 Error while reading config file (Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError
)
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 104, in load_config
    self.config.load()
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 108, in load
    raise ConfigError(tb)
libqtile.confreader.ConfigError: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError
```


Discussion:
Hi @marcostrejo2644 

It doesn't look like you are using the default config. There is no longer a `widget.Pacman`, instead please use `widget.CheckUpdates` which does the same thing.

@tych0 perhaps another API breakage that we can add to `qtile merge`?
> Hi @marcostrejo2644
> 
> It doesn't look like you are using the default config. There is no longer a `widget.Pacman`, instead please use `widget.CheckUpdates` which does the same thing.
> 
> @tych0 perhaps another API breakage that we can add to `qtile merge`?

widget.CheckUpdates fixed the error. Thank you man!
Yes, although migrate doesn't automatically migrate stuff right now. We should add that at some point once it lands.

Resolving patch:
diff --git a/libqtile/scripts/migrate.py b/libqtile/scripts/migrate.py
--- a/libqtile/scripts/migrate.py
+++ b/libqtile/scripts/migrate.py
@@ -59,10 +59,19 @@ def threaded_poll_text_rename(config):
     )
 
 
+def pacman_to_checkupdates(config):
+    return (
+        bowler.Query(config)
+        .select_class("Pacman")
+        .rename("CheckUpdates")
+    )
+
+
 MIGRATIONS = [
     client_name_updated,
     tile_master_windows_rename,
     threaded_poll_text_rename,
+    pacman_to_checkupdates,
 ]
 
 


Test patch:
diff --git a/test/test_migrate.py b/test/test_migrate.py
--- a/test/test_migrate.py
+++ b/test/test_migrate.py
@@ -119,3 +119,21 @@ class MyWidget(ThreadPoolText):
     """)
 
     check_migrate(orig, expected)
+
+
+def test_pacman():
+    orig = textwrap.dedent("""
+        from libqtile import bar
+        from libqtile.widget import Pacman
+
+        bar.Bar([Pacman()])
+    """)
+
+    expected = textwrap.dedent("""
+        from libqtile import bar
+        from libqtile.widget import CheckUpdates
+
+        bar.Bar([CheckUpdates()])
+    """)
+
+    check_migrate(orig, expected)