Giter VIP home page Giter VIP logo

Comments (7)

albertosottile avatar albertosottile commented on July 30, 2024

I had to go to the mentioned PR to understand exactly what this issue was about, as I am not yet in the right mindset for Windows 11. Short answer: I have no idea if this package works under Windows 11, nor I have a way to test it, nor I am sure on how to fix a potential failure.

@goanpeca Would you like to open a PR with a fix? Maybe is it as easy as changing == with >=...

Side note: this is not as trivial as it might seem, as e.g. macOS 11.0 still has platform.mac_ver() = '10.16'. Hence, for whatever PR/solution, I would recommend some testing on the target system...

from darkdetect.

albertosottile avatar albertosottile commented on July 30, 2024

I renamed the issue. I would really appreciate if anyone could test if darkdetect works as expected on Windows 11, so we can close this issue or apply the necessary fixes.

from darkdetect.

GeoffIX avatar GeoffIX commented on July 30, 2024

I have found a modification to the init.py which allows Windows 11 to be detected correctly.
I am running Windows 10 and Windows 11 in Parallels Desktop 17 virtual machines under macOS Big Sur.
I first confirmed that both Windows installs correctly responded to the windows registry commands to discover the current display theme. That led me to look at the version check being used.

Windows 11 still returns '10' from platform.release(), so that part is fine. [Edited to clarify: I'm using Python 3.7.9 as the internal scripting language within Poser 12 software, which I am beta testing on both Windows and macOS. So the caveat is that the output of the platform package may see revision in later versions of Python - who knows? I originally thought that changing the platform.release() test to >= '10' or forgoing the build version test if > '10' would be applicable, but Windows 11 still reports release as '10', so presumably someone decided they didn't want to break python scripts, or else older platform packages have no facility for supporting future windows releases. Shrug.]

Instead of deriving winver from sys.getwindowsversion(), which was reporting 9200 on both win10 and win11 systems, I used the second component of platform.version() which gave me 19041 on win10 and 22000 on win11, after splitting the '10.X.XXXXX' platform.version() output

#winver = int(sys.getwindowsversion()[2])
winver = int(platform.version().split('.')[2]) # This gives better build numbers in Windows 11

from darkdetect.

sayyid5416 avatar sayyid5416 commented on July 30, 2024

I will check it tomorrow

from darkdetect.

sayyid5416 avatar sayyid5416 commented on July 30, 2024

@albertosottile I checked this issue with windows 11. Check the screenshot for the reason.
image

Yeah! Code still works for windows 11.

from darkdetect.

sayyid5416 avatar sayyid5416 commented on July 30, 2024

As a precaution, I created a pull request regarding this #16

from darkdetect.

albertosottile avatar albertosottile commented on July 30, 2024

Closed by #16

from darkdetect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.