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

Remove deprecated libraries (pyqt4, pygtk) #225

Merged
merged 5 commits into from
Jun 18, 2024

Commits on May 18, 2022

  1. Remove PyGtk references

    PyGTK is a dead project that hasn't seen any updates in over a decade
    (since the release of GTK version 3) [1][2]. This is dead code.
    
    [1] https://pypi.org/project/PyGTK/#history
    [2] https://en.wikipedia.org/wiki/PyGTK
    
    Signed-off-by: Stephen Finucane <[email protected]>
    stephenfin committed May 18, 2022
    Configuration menu
    Copy the full SHA
    8580288 View commit details
    Browse the repository at this point in the history
  2. Remove PyQt4 references

    Qt4, and by extension PyQt4, are unsupported since 2015 [1]. There's no
    reason to keep supporting them.
    
    [1] https://www.qt.io/blog/2015/05/26/qt-4-8-7-released
    
    Signed-off-by: Stephen Finucane <[email protected]>
    stephenfin committed May 18, 2022
    Configuration menu
    Copy the full SHA
    ccb412d View commit details
    Browse the repository at this point in the history
  3. Update docs to remove references to pygtk, PyQt4

    Neither of these are supported anymore.
    
    Signed-off-by: Stephen Finucane <[email protected]>
    stephenfin committed May 18, 2022
    Configuration menu
    Copy the full SHA
    2194440 View commit details
    Browse the repository at this point in the history
  4. Remove try-except ladder

    We were using a try-except "ladder" to handle switching between
    backends. While there's nothing totally wrong with this, it was allowing for a
    weird issue to develop. I had previously installed PyQt5 via my distro package
    (Fedora) but had then removed this. Unfortunately removing the package had left
    some files behind:
    
      $ ls /usr/lib64/python3.10/site-packages/PyQt5/* -la
      /usr/lib64/python3.10/site-packages/PyQt5/bindings:
      total 8
      drwxr-xr-x. 2 root root 4096 May 18 15:09 .
      drwxr-xr-x. 4 root root 4096 May 18 15:09 ..
    
      /usr/lib64/python3.10/site-packages/PyQt5/__pycache__:
      total 8
      drwxr-xr-x. 2 root root 4096 May 18 15:09 .
      drwxr-xr-x. 4 root root 4096 May 18 15:09 ..
    
    This meant that I was able to import the 'PyQt5' module but nothing under this:
    
      $ python
      >>> import PyQt5
      >>> from PyQt5.QtWidgets import QApplication
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      ModuleNotFoundError: No module named 'PyQt5.QtWidgets'
    
    This isn't pyperclip's fault. However, by moving away from this
    try-catch ladder and wrapping the import logic inside the try block, we
    can mitigate against this issue when it happens *and* result in less
    indented code.
    
    Signed-off-by: Stephen Finucane <[email protected]>
    stephenfin committed May 18, 2022
    Configuration menu
    Copy the full SHA
    7edce5f View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. Configuration menu
    Copy the full SHA
    2856acf View commit details
    Browse the repository at this point in the history