-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implement Listener Class #32
base: master
Are you sure you want to change the base?
Conversation
@albertosottile How exactly would you accept documentation? There isn't much to document, just the If readthedocs is a must, this requires setup on your side to hook github to readthedocs and such. I've never personally set this up, but found this guide: https://docs.readthedocs.io/en/stable/tutorial/index.html I can edit |
For me it is ok to put the documentation in the README, as long as it is clear and it does not clutter it too much. I only suggested readthedocs in case you wanted to do this more extensively and you felt too much constrained by the README. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a first round of review, but I'd like to test this myself on all the platforms as well.
General comment, if you do not mind I would release 0.8.0 from the current codebase, and then eventually land this change in 0.9.0. Would that be ok for you? |
I have 0 issues with this, presuming that there is nothing that forces you to obey some arbitrary delay between releases. I.e. if |
With the last 2 commits, when calling > listener.stop()
> # Listener alive and listening, callbacks will probably no longer be called
> set_theme("Dark")
> # Listener is now dead, `.wait()` will return instantly. callback was not called Note: probably because there is a race condition, but that is ok. |
Actually, I will add in one more tweak, some extra error checking! |
macOS Ventura and Ubuntu 22.04. I do not have a windows machine. I may be able to borrow one next week to test, though if you have access to one that would be appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some requested changes and I will probably apply further editing to the README after this PR is merged.
One side note: I am on holiday until the second week of January, so I cannot test this. We could either finish the review during this timeframe and merge it after, or merge it during the holidays and test it after, I have no strong feelings. Nevertheless, a release will have to wait for proper testing.
I have no issues waiting; I prefer having something fully tested before merging. I have tested this myself, but I lack windows and know you had some other tests to run. |
@albertosottile I've addressed every message post I believe. |
@albertosottile Is there something I can do to help get this merged? |
@albertosottile Once this is merged, perhaps one way to solve the |
I apology, but I do not have any free time to work on this at the moment and I am not sure regarding when the situation will improve. This is definitely not a small PR and so it is not something I can hack in right before going to sleep. I will try to review it and maybe to test it on Windows ASAP, but I am afraid you cannot expect it in the next days. |
Implements: #31
Changes:
_mac_detect.py
and other files now only need to expose only two objects,theme
and someBaseListener
subclass.__all__
added to_*_detect.py
files so that only the main objects are dumped when doingimport *
py.typed
added to allow better type annotation checking via tools such asmypy
pylint
complained aboutisDark()
,isLight()
, anddef listener
out into__init__.py
to avoid code duplication.Before merging:
Required
Optional
WindowsListener
.stop(0)
be more than a no-opAfter merging:
New Issues:
.stop(None)
for Windows by improving Windows stop function