From 4b57f313ed6948212582de05205a3ae4372ed812 Mon Sep 17 00:00:00 2001 From: numirias Date: Sun, 21 Feb 2021 06:25:33 +0100 Subject: [PATCH] Fix 0.17 compat --- .travis.yml | 8 ++++---- lib/qtile | 2 +- plasma/layout.py | 12 ++++++------ plasma/node.py | 2 +- setup.py | 8 ++++---- tests/test_layout.py | 5 +++-- tox.ini | 5 +++-- 7 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3144535..1b6f087 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,15 @@ language: python python: - - "3.5" - - "3.6" - - "3.7-dev" + - "3.7" + - "3.8" + - "3.9" addons: apt: packages: - xserver-xephyr jobs: include: - - python: 3.6 + - python: 3.9 env: TOXENV=lint install: - pip install tox-travis codecov diff --git a/lib/qtile b/lib/qtile index 0d68191..3697057 160000 --- a/lib/qtile +++ b/lib/qtile @@ -1 +1 @@ -Subproject commit 0d6819181632df8ba13d8468530ad9c628142dcc +Subproject commit 36970579d8d9c8db9726d5629591ee60c9af26a4 diff --git a/plasma/layout.py b/plasma/layout.py index 842920a..9e19bd3 100644 --- a/plasma/layout.py +++ b/plasma/layout.py @@ -72,11 +72,11 @@ def add(self, client): def remove(self, client): self.root.find_payload(client).remove() - def configure(self, client, screen): - self.root.x = screen.x - self.root.y = screen.y - self.root.width = screen.width - self.root.height = screen.height + def configure(self, client, screen_rect): + self.root.x = screen_rect.x + self.root.y = screen_rect.y + self.root.width = screen_rect.width + self.root.height = screen_rect.height node = self.root.find_payload(client) border_width = self.border_width_single if self.root.tree == [node] \ else self.border_width @@ -90,7 +90,7 @@ def configure(self, client, screen): width-2*border_width, height-2*border_width, border_width, - self.group.qtile.color_pixel(border_color), + border_color, margin=self.margin, ) # Always keep tiles below floating windows diff --git a/plasma/node.py b/plasma/node.py index b3e25e7..825aaf0 100644 --- a/plasma/node.py +++ b/plasma/node.py @@ -557,7 +557,7 @@ def restore(self, node): try: parent, idx, sizes, fixed, flip = restorables[node.payload] except KeyError: - raise NotRestorableError() + raise NotRestorableError() # pylint: disable=raise-missing-from if parent not in self.root: # Don't try to restore if parent is not part of the tree anymore raise NotRestorableError() diff --git a/setup.py b/setup.py index 05c06ec..66b5204 100644 --- a/setup.py +++ b/setup.py @@ -3,23 +3,23 @@ setup( name='qtile-plasma', packages=['plasma'], - version='1.5.5', + version='1.5.6', description='A flexible, tree-based layout for Qtile', author='numirias', author_email='numirias@users.noreply.github.com', url='https://github.com/numirias/qtile-plasma', license='MIT', python_requires='>=3', - install_requires=['xcffib>=0.5.0', 'qtile>=0.14.2'], + install_requires=['xcffib>=0.5.0', 'qtile>=0.17'], classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Operating System :: Unix', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Desktop Environment :: Window Managers', ], ) diff --git a/tests/test_layout.py b/tests/test_layout.py index 2a068da..7ebe997 100644 --- a/tests/test_layout.py +++ b/tests/test_layout.py @@ -10,8 +10,9 @@ sys.path.insert(0, str(Path(__file__).parents[1] / 'lib')) # noqa: E402 from qtile.libqtile import config from qtile.libqtile.layout import Floating -from qtile.test.conftest import no_xinerama, qtile, xephyr, xvfb # noqa: F401 +from qtile.test.conftest import manager as qtile, no_xinerama, xephyr, xvfb # noqa: F401 from qtile.test.layouts.layout_utils import assert_focused +from qtile.libqtile.confreader import Config as _Config @fixture @@ -25,7 +26,7 @@ def grid(qtile): qtile.c.layout.mode_vertical() qtile.test_window('d') -class Config: +class Config(_Config): auto_fullscreen = True main = None diff --git a/tox.ini b/tox.ini index 3ca7173..ad49324 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35,py36,py37,lint,coverage-report +envlist = py37,py38,py39,lint,coverage-report [testenv] deps = @@ -12,7 +12,7 @@ commands = coverage run --parallel -m pytest -v {posargs} tests/ [testenv:coverage-report] -basepython = python3.7 +basepython = python3.9 skip_install = true deps = coverage commands = @@ -49,3 +49,4 @@ disable = no-self-use, too-many-instance-attributes, fixme, + raise-missing-from,