prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add git information in about and console
  **Information**
  Installed version of solaar::  1.1.7+git1897-9c361c4~ubuntu22.10.1
  Distribution: Ubuntu 22.10 + https://launchpad.net/~solaar-unifying/+archive/ubuntu/ppa (git)
  Kernel version: Linux 6.1.0-060100rc5-generic x86_64 GNU/Linux
  
  Example:
  a)
  ![image](https://user-images.githubusercontent.com/48624942/202720677-1d1257ab-3113-429b-b29c-78765161e1c4.png)
  
  b)
  $ solaar show
  Solaar version 1.1.7-9c361c4
  
  [...]
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 #!/usr/bin/env python3
  2 
  3 from glob import glob as _glob
  4 
  5 try:
  6     from setuptools import setup
  7 except ImportError:
  8     from distutils.core import setup
  9 
  10 main_ns = {}
  11 with open('lib/solaar/__init__.py') as ver_file:
  12     exec(ver_file.read(), main_ns)
  13 NAME = main_ns['NAME']
  14 __version__ = main_ns['__version__']
  15 
  16 
  17 def _data_files():
  18     from os.path import dirname as _dirname
  19 
  20     yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')
  21     yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')
  22     yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']
  23 
  24     for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):
  25         yield _dirname(mo), [mo]
  26 
  27     yield 'share/applications', ['share/applications/solaar.desktop']
  28     yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']
  29     yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']
  30 
  31     del _dirname
  32 
  33 
  34 setup(
  35     name=NAME.lower(),
  36     version=__version__,
  37     description='Linux device manager for Logitech receivers, keyboards, mice, and tablets.',
  38     long_description='''
  39 Solaar is a Linux device manager for many Logitech peripherals that connect through
  40 Unifying and other receivers or via USB or Bluetooth.
  41 Solaar is able to pair/unpair devices with receivers and show and modify some of the
  42 modifiable features of devices.
  43 For instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/installation'''.strip(),
  44     author='Daniel Pavel',
  45     license='GPLv2',
  46     url='http://pwr-solaar.github.io/Solaar/',
  47     classifiers=[
  48         'Development Status :: 4 - Beta',
  49         'Environment :: X11 Applications :: GTK',
  50         'Environment :: Console',
  51         'Intended Audience :: End Users/Desktop',
  52         'License :: DFSG approved',
  53         'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
  54         'Natural Language :: English',
  55         'Programming Language :: Python :: 3 :: Only',
  56         'Operating System :: POSIX :: Linux',
  57         'Topic :: Utilities',
  58     ],
  59     platforms=['linux'],
  60 
  61     # sudo apt install python-gi python3-gi \
  62     #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1
  63     # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
  64     python_requires='>=3.7',
  65     install_requires=[
  66         'evdev (>= 1.1.2)',
  67         'pyudev (>= 0.13)',
  68         'PyYAML (>= 3.12)',
  69         'python-xlib (>= 0.27)',
  70         'psutil (>= 5.4.3)',
  71     ],
  72     extras_require={
  73         'report-descriptor': ['hid-parser'],
  74         'desktop-notifications': ['Notify (>= 0.7)'],
  75     },
  76     package_dir={'': 'lib'},
  77     packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],
  78     data_files=list(_data_files()),
  79     scripts=_glob('bin/*'),
  80 )
  81
  ```
  
  Path: `lib/solaar/__init__.py`
  Content:
  ```
  1 # -*- python-mode -*-
  2 
  3 ## Copyright (C) 2012-2013  Daniel Pavel
  4 ##
  5 ## This program is free software; you can redistribute it and/or modify
  6 ## it under the terms of the GNU General Public License as published by
  7 ## the Free Software Foundation; either version 2 of the License, or
  8 ## (at your option) any later version.
  9 ##
  10 ## This program is distributed in the hope that it will be useful,
  11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13 ## GNU General Public License for more details.
  14 ##
  15 ## You should have received a copy of the GNU General Public License along
  16 ## with this program; if not, write to the Free Software Foundation, Inc.,
  17 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18 
  19 __version__ = '1.1.7'
  20 NAME = 'Solaar'
  21
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/lib/solaar/__init__.py b/lib/solaar/__init__.py
  --- a/lib/solaar/__init__.py
  +++ b/lib/solaar/__init__.py
  @@ -16,5 +16,11 @@
   ## with this program; if not, write to the Free Software Foundation, Inc.,
   ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   
  -__version__ = '1.1.7'
  +__version_short__ = '1.1.7'
   NAME = 'Solaar'
  +
  +try:
  +    import gitinfo
  +    __version__ = __version_short__ + '-' + gitinfo.get_git_info()['commit'][:8]
  +except Exception:
  +    __version__ = __version_short__
  diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -11,7 +11,7 @@
   with open('lib/solaar/__init__.py') as ver_file:
       exec(ver_file.read(), main_ns)
   NAME = main_ns['NAME']
  -__version__ = main_ns['__version__']
  +__version__ = main_ns['__version_short__']
   
   
   def _data_files():
  @@ -72,6 +72,7 @@
       extras_require={
           'report-descriptor': ['hid-parser'],
           'desktop-notifications': ['Notify (>= 0.7)'],
  +        'git-commit': ['python-git-info'],
       },
       package_dir={'': 'lib'},
       packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],
  
verification_info: {"golden_diff": "diff --git a/lib/solaar/__init__.py b/lib/solaar/__init__.py\n--- a/lib/solaar/__init__.py\n+++ b/lib/solaar/__init__.py\n@@ -16,5 +16,11 @@\n ## with this program; if not, write to the Free Software Foundation, Inc.,\n ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n \n-__version__ = '1.1.7'\n+__version_short__ = '1.1.7'\n NAME = 'Solaar'\n+\n+try:\n+    import gitinfo\n+    __version__ = __version_short__ + '-' + gitinfo.get_git_info()['commit'][:8]\n+except Exception:\n+    __version__ = __version_short__\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -11,7 +11,7 @@\n with open('lib/solaar/__init__.py') as ver_file:\n     exec(ver_file.read(), main_ns)\n NAME = main_ns['NAME']\n-__version__ = main_ns['__version__']\n+__version__ = main_ns['__version_short__']\n \n \n def _data_files():\n@@ -72,6 +72,7 @@\n     extras_require={\n         'report-descriptor': ['hid-parser'],\n         'desktop-notifications': ['Notify (>= 0.7)'],\n+        'git-commit': ['python-git-info'],\n     },\n     package_dir={'': 'lib'},\n     packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],\n", "issue": "Add git information in about and console\n**Information**\r\nInstalled version of solaar::  1.1.7+git1897-9c361c4~ubuntu22.10.1\r\nDistribution: Ubuntu 22.10 + https://launchpad.net/~solaar-unifying/+archive/ubuntu/ppa (git)\r\nKernel version: Linux 6.1.0-060100rc5-generic x86_64 GNU/Linux\r\n\r\nExample:\r\na)\r\n![image](https://user-images.githubusercontent.com/48624942/202720677-1d1257ab-3113-429b-b29c-78765161e1c4.png)\r\n\r\nb)\r\n$ solaar show\r\nSolaar version 1.1.7-9c361c4\r\n\r\n[...]\n", "before_files": [{"content": "#!/usr/bin/env python3\n\nfrom glob import glob as _glob\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\nmain_ns = {}\nwith open('lib/solaar/__init__.py') as ver_file:\n    exec(ver_file.read(), main_ns)\nNAME = main_ns['NAME']\n__version__ = main_ns['__version__']\n\n\ndef _data_files():\n    from os.path import dirname as _dirname\n\n    yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')\n    yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')\n    yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']\n\n    for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):\n        yield _dirname(mo), [mo]\n\n    yield 'share/applications', ['share/applications/solaar.desktop']\n    yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']\n    yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']\n\n    del _dirname\n\n\nsetup(\n    name=NAME.lower(),\n    version=__version__,\n    description='Linux device manager for Logitech receivers, keyboards, mice, and tablets.',\n    long_description='''\nSolaar is a Linux device manager for many Logitech peripherals that connect through\nUnifying and other receivers or via USB or Bluetooth.\nSolaar is able to pair/unpair devices with receivers and show and modify some of the\nmodifiable features of devices.\nFor instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/installation'''.strip(),\n    author='Daniel Pavel',\n    license='GPLv2',\n    url='http://pwr-solaar.github.io/Solaar/',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: X11 Applications :: GTK',\n        'Environment :: Console',\n        'Intended Audience :: End Users/Desktop',\n        'License :: DFSG approved',\n        'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',\n        'Natural Language :: English',\n        'Programming Language :: Python :: 3 :: Only',\n        'Operating System :: POSIX :: Linux',\n        'Topic :: Utilities',\n    ],\n    platforms=['linux'],\n\n    # sudo apt install python-gi python3-gi \\\n    #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1\n    # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],\n    python_requires='>=3.7',\n    install_requires=[\n        'evdev (>= 1.1.2)',\n        'pyudev (>= 0.13)',\n        'PyYAML (>= 3.12)',\n        'python-xlib (>= 0.27)',\n        'psutil (>= 5.4.3)',\n    ],\n    extras_require={\n        'report-descriptor': ['hid-parser'],\n        'desktop-notifications': ['Notify (>= 0.7)'],\n    },\n    package_dir={'': 'lib'},\n    packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],\n    data_files=list(_data_files()),\n    scripts=_glob('bin/*'),\n)\n", "path": "setup.py"}, {"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013  Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your option) any later version.\n##\n## This program is distributed in the hope that it will be useful,\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n## GNU General Public License for more details.\n##\n## You should have received a copy of the GNU General Public License along\n## with this program; if not, write to the Free Software Foundation, Inc.,\n## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n__version__ = '1.1.7'\nNAME = 'Solaar'\n", "path": "lib/solaar/__init__.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n\nfrom glob import glob as _glob\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\nmain_ns = {}\nwith open('lib/solaar/__init__.py') as ver_file:\n    exec(ver_file.read(), main_ns)\nNAME = main_ns['NAME']\n__version__ = main_ns['__version_short__']\n\n\ndef _data_files():\n    from os.path import dirname as _dirname\n\n    yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')\n    yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')\n    yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']\n\n    for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):\n        yield _dirname(mo), [mo]\n\n    yield 'share/applications', ['share/applications/solaar.desktop']\n    yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']\n    yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']\n\n    del _dirname\n\n\nsetup(\n    name=NAME.lower(),\n    version=__version__,\n    description='Linux device manager for Logitech receivers, keyboards, mice, and tablets.',\n    long_description='''\nSolaar is a Linux device manager for many Logitech peripherals that connect through\nUnifying and other receivers or via USB or Bluetooth.\nSolaar is able to pair/unpair devices with receivers and show and modify some of the\nmodifiable features of devices.\nFor instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/installation'''.strip(),\n    author='Daniel Pavel',\n    license='GPLv2',\n    url='http://pwr-solaar.github.io/Solaar/',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: X11 Applications :: GTK',\n        'Environment :: Console',\n        'Intended Audience :: End Users/Desktop',\n        'License :: DFSG approved',\n        'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',\n        'Natural Language :: English',\n        'Programming Language :: Python :: 3 :: Only',\n        'Operating System :: POSIX :: Linux',\n        'Topic :: Utilities',\n    ],\n    platforms=['linux'],\n\n    # sudo apt install python-gi python3-gi \\\n    #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1\n    # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],\n    python_requires='>=3.7',\n    install_requires=[\n        'evdev (>= 1.1.2)',\n        'pyudev (>= 0.13)',\n        'PyYAML (>= 3.12)',\n        'python-xlib (>= 0.27)',\n        'psutil (>= 5.4.3)',\n    ],\n    extras_require={\n        'report-descriptor': ['hid-parser'],\n        'desktop-notifications': ['Notify (>= 0.7)'],\n        'git-commit': ['python-git-info'],\n    },\n    package_dir={'': 'lib'},\n    packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],\n    data_files=list(_data_files()),\n    scripts=_glob('bin/*'),\n)\n", "path": "setup.py"}, {"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013  Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your option) any later version.\n##\n## This program is distributed in the hope that it will be useful,\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n## GNU General Public License for more details.\n##\n## You should have received a copy of the GNU General Public License along\n## with this program; if not, write to the Free Software Foundation, Inc.,\n## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n__version_short__ = '1.1.7'\nNAME = 'Solaar'\n\ntry:\n    import gitinfo\n    __version__ = __version_short__ + '-' + gitinfo.get_git_info()['commit'][:8]\nexcept Exception:\n    __version__ = __version_short__\n", "path": "lib/solaar/__init__.py"}]}