notify-py icon indicating copy to clipboard operation
notify-py copied to clipboard

fix: UnsupportedPlatform exception on Windows 11 and Python 3.12

Open TransparentLC opened this issue 2 years ago • 3 comments

It seems that platform.release() will return '11' on Windows 11 instead of '10' in Python 3.12, which leads to an unexpected UnsupportedPlatform exception. I created this PR to fix the detection code.

TransparentLC avatar Nov 02 '23 04:11 TransparentLC

Why hasn't this been merged yet😭

mohamed-khettab avatar Jan 28 '24 15:01 mohamed-khettab

@mohamed-khettab

My temporary fix:

import notifypy
import functools
notifypy.Notify._selected_notification_system = functools.partial(notifypy.Notify._selected_notification_system, override_windows_version_detection=True)

Reference:

https://github.com/ms7m/notify-py/blob/0c09c6b76cbe941c394798c4c4c838d5840b3bb5/notifypy/notify.py#L112-L125

TransparentLC avatar Jan 28 '24 15:01 TransparentLC

@TransparentLC Will give it a try later. Thank you ☺️

mohamed-khettab avatar Jan 28 '24 15:01 mohamed-khettab

@TransparentLC Thanks for the temporary fix, I tested it and it is working again in my environment !

BerserkWolfS avatar Mar 27 '24 09:03 BerserkWolfS

@ms7m Would you please merge this PR to fix the issue with UnsupportedPlatform exception on Windows 11 when using Python 3.12

ramsy0dev avatar May 29 '24 02:05 ramsy0dev

I'll merge + publish in the latest changes this weekend.

I'll be near my computer with my PyPi keys then.

ms7m avatar May 31 '24 03:05 ms7m

v0.3.43 has been published containing this fix!

ms7m avatar Jun 05 '24 14:06 ms7m