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

ulauncher: add pyasyncore for Python 3.12 compat #327753

Closed
wants to merge 1 commit into from

Conversation

cluther
Copy link

@cluther cluther commented Jul 16, 2024

asyncore has been removed from Python 3.12. For applications that still
need it, the pyasyncore dependency can be explicitly added. So that's
what we'll do.

After nixpkgs updated to Python 3.12, I began getting the following
traceback when starting ulauncher.

Traceback (most recent call last):
  File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/bin/.ulauncher-wrapped", line 28, in <module>
    from ulauncher.main import main
  File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/lib/python3.12/site-packages/ulauncher/main.py", line 25, in <module>
    from ulauncher.ui.windows.UlauncherWindow import UlauncherWindow
  File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/lib/python3.12/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 37, in <module>
    from ulauncher.search.apps.app_watcher import start as start_app_watcher
  File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/lib/python3.12/site-packages/ulauncher/search/apps/app_watcher.py", line 7, in <module>
    import pyinotify
  File "/nix/store/8bxngdzbnzig8ddw0ypdg1plsmrpqmi2-python3.12-pyinotify-0.9.6/lib/python3.12/site-packages/pyinotify.py", line 71, in <module>
    import asyncore
ModuleNotFoundError: No module named 'asyncore'

Adding pyasyncore to propagatedBuildInputs solves this and ulauncher
functions normally with no errors logged.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD".
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

asyncore has been removed from Python 3.12. For applications that still
need it, the pyasyncore dependency can be explicitly added. So that's
what we'll do.

After nixpkgs updated to Python 3.12, I began getting the following
traceback when starting ulauncher.

    Traceback (most recent call last):
      File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/bin/.ulauncher-wrapped", line 28, in <module>
        from ulauncher.main import main
      File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/lib/python3.12/site-packages/ulauncher/main.py", line 25, in <module>
        from ulauncher.ui.windows.UlauncherWindow import UlauncherWindow
      File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/lib/python3.12/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 37, in <module>
        from ulauncher.search.apps.app_watcher import start as start_app_watcher
      File "/nix/store/rcqlxcr07aylib5sa7v38b4ba92jzxx4-ulauncher-5.15.7/lib/python3.12/site-packages/ulauncher/search/apps/app_watcher.py", line 7, in <module>
        import pyinotify
      File "/nix/store/8bxngdzbnzig8ddw0ypdg1plsmrpqmi2-python3.12-pyinotify-0.9.6/lib/python3.12/site-packages/pyinotify.py", line 71, in <module>
        import asyncore
    ModuleNotFoundError: No module named 'asyncore'

Adding pyasyncore to propagatedBuildInputs solves this and ulauncher
functions normally with no errors logged.
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jul 16, 2024
@ofborg ofborg bot requested review from SebTM and aaronjanse July 16, 2024 22:39
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Jul 16, 2024
@cluther
Copy link
Author

cluther commented Jul 17, 2024

It appears that this change to ulauncher is no longer necessary. #325685 fixed it in pyinotify.

@cluther cluther closed this Jul 17, 2024
@cluther cluther deleted the ulauncher-pyasyncore branch July 17, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants