xcffib
Advanced tools
+1
-2
| Metadata-Version: 2.4 | ||
| Name: xcffib | ||
| Version: 1.11.1 | ||
| Version: 1.11.2 | ||
| Summary: xcffib is the XCB binding for python | ||
@@ -21,3 +21,2 @@ Author-email: Tycho Andersen <tycho@tycho.pizza> | ||
| Requires-Dist: pytest>=8.4; extra == "dev" | ||
| Requires-Dist: pytest-xdist; extra == "dev" | ||
| Dynamic: license-file | ||
@@ -24,0 +23,0 @@ |
+1
-2
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "xcffib" | ||
| version = "1.11.1" | ||
| version = "1.11.2" | ||
| description = "xcffib is the XCB binding for python" | ||
@@ -42,3 +42,2 @@ readme = "README.md" | ||
| "pytest>=8.4", | ||
| "pytest-xdist", | ||
| ] |
| Metadata-Version: 2.4 | ||
| Name: xcffib | ||
| Version: 1.11.1 | ||
| Version: 1.11.2 | ||
| Summary: xcffib is the XCB binding for python | ||
@@ -21,3 +21,2 @@ Author-email: Tycho Andersen <tycho@tycho.pizza> | ||
| Requires-Dist: pytest>=8.4; extra == "dev" | ||
| Requires-Dist: pytest-xdist; extra == "dev" | ||
| Dynamic: license-file | ||
@@ -24,0 +23,0 @@ |
@@ -7,2 +7,1 @@ | ||
| pytest>=8.4 | ||
| pytest-xdist |
@@ -42,3 +42,3 @@ # Copyright 2014 Tycho Andersen | ||
| __xcb_proto_version__ = "1.17.0" | ||
| __version__ = "1.11.1" | ||
| __version__ = "1.11.2" | ||
@@ -45,0 +45,0 @@ X_PROTOCOL = lib.X_PROTOCOL |
+9
-23
@@ -19,2 +19,3 @@ # Copyright 2014 Tycho Andersen | ||
| import errno | ||
| import fcntl | ||
| import os | ||
@@ -34,28 +35,13 @@ import subprocess | ||
| while True: | ||
| lock_file = lock_path(display) | ||
| try: | ||
| with open(lock_file, 'r') as f: | ||
| pid = int(f.read().strip()) | ||
| f = open(lock_path(display), "w+") | ||
| try: | ||
| os.kill(pid, 0) | ||
| display += 1 | ||
| continue | ||
| except (OSError, ProcessLookupError): | ||
| try: | ||
| os.remove(lock_file) | ||
| except FileNotFoundError: | ||
| pass | ||
| except (FileNotFoundError, ValueError, OSError): | ||
| pass | ||
| try: | ||
| fd = os.open(lock_file, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o644) | ||
| os.write(fd, str(os.getpid()).encode()) | ||
| return display, fd | ||
| except FileExistsError: | ||
| fcntl.flock(f.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB) | ||
| except OSError: | ||
| f.close() | ||
| raise | ||
| except OSError: | ||
| display += 1 | ||
| continue | ||
| return display, f | ||
@@ -122,3 +108,3 @@ | ||
| os.remove(lock_path(self._display)) | ||
| os.close(self._display_lock) | ||
| self._display_lock.close() | ||
| except OSError as e: | ||
@@ -125,0 +111,0 @@ # we don't care if it doesn't exist, maybe something crashed and |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
1054577
-0.05%29290
-0.03%