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

GNU: Add new platform for GNU/Hurd (based off Linux) #2462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zamaudio
Copy link

Summary

  • OS: GNU
  • Bug fix: no
  • Type: new api

Description

Adds support for new platform GNU/Hurd based on Linux one.

TODO: Fix NotImplementedError:
/proc/diskstats nor /sys/block filesystem are available on this system

TODO: Fix NotImplementedError:
/proc/diskstats nor /sys/block filesystem are available on this system

Signed-off-by: Damien Zammit <[email protected]>
@giampaolo
Copy link
Owner

giampaolo commented Oct 17, 2024

Thanks for the effort, but I'm afraid I am not gonna merge this work for the same reasons given for IBMi (#1564 (comment)), Haiku (#1690 (comment)) and QNX (#2143) platforms.

At a first glance, GNU/Hurd seems even more niche than those platforms. We can't setup a CI for it, you would be the only maintainer, and the number of downloads would be so low that it's not worth the trouble to add (and maintain) the additional 2800+ lines of code to the current source tree.

I think it makes more sense to make this work develop and mature in your own fork. If your fork is good enough, I can list it somewhere in psutil's README or doc.

With that said, I can give you support reviewing your changes. E.g. the first thing I would recommend is to re-use _pslinux.py instead of copying it into _psgnu.py. If GNU/Hurd supports the /proc FS, as it seems, adding support for it should be much easier than you think, as you can reuse _pslinux.py implementation in full, and just add if GNUHURD: ... where necessary. Just to give you an idea:

# _psgnu.py

from _pslinux import *
import _pslinux


def virtual_memory():
    # alternative implementation for virtual_memory()



class Process(_pslinux.Process):
    def name(self):
        # alternative implementation for name()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants