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

Qtile check breaks #3634

Closed
1 task done
Malex opened this issue Jun 16, 2022 · 4 comments
Closed
1 task done

Qtile check breaks #3634

Malex opened this issue Jun 16, 2022 · 4 comments

Comments

@Malex
Copy link
Contributor

Malex commented Jun 16, 2022

The issue:

Qtile check breaks on some parameter passed to shutil.copytree on python 3.7

foijeaf@localhost ~ $ qtile check checking qtile config file /home/foijeaf/.config/qtile/config.py Traceback (most recent call last): File "/usr/lib/python-exec/python3.7/qtile", line 33, in <module> sys.exit(load_entry_point('qtile==0.21.0', 'console_scripts', 'qtile')()) File "/usr/lib/python3.7/site-packages/libqtile/scripts/main.py", line 66, in main options.func(options) File "/usr/lib/python3.7/site-packages/libqtile/scripts/check.py", line 118, in check_config shutil.copytree(path.dirname(args.configfile), tempdir, dirs_exist_ok=True) TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'

Qtile version is 0.21.0

Required:

  • I have searched past issues to see if this bug has already been reported.
@LordXerus
Copy link

dirs_exist_ok is a parameter added in Python 3.8

@m-col
Copy link
Member

m-col commented Jun 17, 2022

qtile check does not support Python 3.7 as Typing is used in the codebase, which was added in 3.8. Had you not hit that error, qtile check would have printed an error saying this message. That's pretty ironic if the message can't even be reached on py37, so that should definitely be fixed. Regardless, we typically only support the most recent 3 major of versions... 3.7 is pretty old. It may not be a very satisfying answer, sorry, but I suggest upgrading.

@Malex
Copy link
Contributor Author

Malex commented Jun 17, 2022

qtile check does not support Python 3.7 as Typing is used in the codebase, which was added in 3.8. Had you not hit that error, qtile check would have printed an error saying this message. That's pretty ironic if the message can't even be reached on py37, so that should definitely be fixed. Regardless, we typically only support the most recent 3 major of versions... 3.7 is pretty old. It may not be a very satisfying answer, sorry, but I suggest upgrading.

I perfectly understand your reasoning, I myself would use a more recent version of python, but python is not considered stable on my distro, for whatever reason (I'm on Funtoo). Not your problem, it's just it was not clear which versions are supported: the README does not state it, the setup.py had 3.7 as one of the version.
I think though that qtile check should (or could) fail more "elegantly", which a message clearly stating check is not supported for <3.8, and/or clearly state what qtile supports and what qtile "should mostly work on but some stuff will fail" (3.7)

m-col added a commit to m-col/qtile that referenced this issue Jun 26, 2022
The main change here is that dependencies for the script are all checked
at the very beginning. Currently there is an issue on python 3.7 where
the error message that tells the user that 3.7 isn't supported doesn't
even get reached! This fixes that.

Also some minor cosmetic changes.

See qtile#3634
@m-col
Copy link
Member

m-col commented Jun 26, 2022

100% agree. I've fixed up the check script so that this error message actually gets printed: #3662

m-col added a commit that referenced this issue Jun 26, 2022
The main change here is that dependencies for the script are all checked
at the very beginning. Currently there is an issue on python 3.7 where
the error message that tells the user that 3.7 isn't supported doesn't
even get reached! This fixes that.

Also some minor cosmetic changes.

See #3634
@Malex Malex closed this as completed Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants