Skip to content

Commit 1c163a2

Browse files
committed
Merge branch 'master' of https://github.com/python-xlib/python-xlib into type-comments
2 parents d1797a3 + 4e8bbf8 commit 1c163a2

File tree

16 files changed

+83
-60
lines changed

16 files changed

+83
-60
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
NEWS for Python X Library
22

3+
Version 0.33
4+
============
5+
6+
Bug Fixes
7+
---------
8+
9+
- Removed unused imports (thanks @Avasam).
10+
- Avoid to use fcntl module on some environments (thanks @i2y).
11+
- Change a test behavior for `unix_connect.get_socket` (thanks @i2y).
12+
- Fix accidental data change (thanks @Avasam).
13+
- Prefer `bool` over `Literal[0, 1, None]` (thanks @Avasam).
14+
- Change parentheses to brackets in LICENSE (thanks @mtelka).
15+
16+
---
317
Version 0.32
418
============
519

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
Everyone is permitted to copy and distribute verbatim copies
77
of this license document, but changing it is not allowed.
88

9-
(This is the first released version of the Lesser GPL. It also counts
9+
[This is the first released version of the Lesser GPL. It also counts
1010
as the successor of the GNU Library Public License, version 2, hence
11-
the version number 2.1.)
11+
the version number 2.1.]
1212

1313
Preamble
1414

Xlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Suite 330,
2020
# Boston, MA 02111-1307 USA
2121

22-
__version__ = (0, 32)
22+
__version__ = (0, 33)
2323

2424
__version_extra__ = ''
2525

Xlib/display.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(self, *args, **keys):
9494
protocol_display.Display.__init__(self, *args, **keys)
9595
self._atom_cache = {}
9696

97-
def get_atom(self, atomname, only_if_exists=0):
97+
def get_atom(self, atomname, only_if_exists=False):
9898
# type: (str, bool) -> int
9999
if atomname in self._atom_cache:
100100
return self._atom_cache[atomname]
@@ -554,7 +554,7 @@ def rebind_string(self, keysym, newstring):
554554
### X requests
555555
###
556556

557-
def intern_atom(self, name, only_if_exists = 0):
557+
def intern_atom(self, name, only_if_exists = False):
558558
# type: (str, bool) -> int
559559
"""Intern the string name, returning its atom number. If
560560
only_if_exists is true and the atom does not already exist, it
@@ -564,7 +564,7 @@ def intern_atom(self, name, only_if_exists = 0):
564564
only_if_exists = only_if_exists)
565565
return r.atom
566566

567-
def get_atom(self, atom, only_if_exists = 0):
567+
def get_atom(self, atom, only_if_exists = False):
568568
# type: (str, bool) -> int
569569
"""Alias for intern_atom, using internal cache"""
570570
return self.display.get_atom(atom, only_if_exists)
@@ -586,7 +586,7 @@ def get_selection_owner(self, selection):
586586
selection = selection)
587587
return r.owner
588588

589-
def send_event(self, destination, event, event_mask = 0, propagate = 0,
589+
def send_event(self, destination, event, event_mask = 0, propagate = False,
590590
onerror = None):
591591
# type: (int, rq.Event, int, bool, _ErrorHandler[object] | None) -> None
592592
"""Send a synthetic event to the window destination which can be

Xlib/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class XError(rq.GetAttrData, Exception):
8484

8585
def __init__(self, display, data):
8686
# type: (display.Display, _SliceableBuffer) -> None
87-
self._data, data = self._fields.parse_binary(data, display, rawdict = 1)
87+
self._data, _ = self._fields.parse_binary(data, display, rawdict = True)
8888

8989
def __str__(self):
9090
s = []

Xlib/ext/composite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
graphics.
3434
"""
3535

36-
from Xlib import X
3736
from Xlib.protocol import rq
3837
from Xlib.xobject import drawable
3938

Xlib/ext/dpms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
Documentation: https://www.x.org/releases/X11R7.7/doc/xextproto/dpms.html
2828
'''
2929

30-
from Xlib import X
3130
from Xlib.protocol import rq
3231
from Xlib.display import Display
3332
from Xlib.xobject import resource

Xlib/ext/randr.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@
3434
"""
3535

3636

37-
from tkinter import W
3837
from Xlib import X
39-
from Xlib.protocol import rq, structs
38+
from Xlib.protocol import rq
4039
try:
4140
from typing import TYPE_CHECKING
4241
except ImportError:
4342
TYPE_CHECKING = False
4443
if TYPE_CHECKING:
45-
from Xlib import error
4644
from Xlib.display import Display
4745
from Xlib.protocol import request
4846
from Xlib.xobject import resource, drawable

Xlib/ext/record.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# Suite 330,
2020
# Boston, MA 02111-1307 USA
2121

22-
from Xlib import X
2322
from Xlib.protocol import rq
2423

2524
try:

Xlib/ext/xfixes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
ShowCursor requests and SelectionNotify events are provided.
2626
'''
2727

28-
from Xlib import X
2928
from Xlib.protocol import rq, request
3029
from Xlib.display import Display
3130
from Xlib.xobject import resource, drawable

0 commit comments

Comments
 (0)