Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-evdev for openSUSE:Factory checked in at 2025-05-09 18:48:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-evdev (Old) and /work/SRC/openSUSE:Factory/.python-evdev.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-evdev" Fri May 9 18:48:49 2025 rev:19 rq:1275919 version:1.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-evdev/python-evdev.changes 2025-02-22 19:06:25.078452532 +0100 +++ /work/SRC/openSUSE:Factory/.python-evdev.new.30101/python-evdev.changes 2025-05-09 18:51:45.206062114 +0200 @@ -1,0 +2,7 @@ +Thu May 1 20:11:01 UTC 2025 - Matthias Bach <ma...@marix.org> - 1.9.2 + +- Update to 1.9.2 + * Use Generic to set precise type for InputDevice.path. + * Allow supressing build-dependent information in ecodes.c. + +------------------------------------------------------------------- Old: ---- python-evdev-1.9.1.tar.gz New: ---- python-evdev-1.9.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-evdev.spec ++++++ --- /var/tmp/diff_new_pack.Mmhz2J/_old 2025-05-09 18:51:45.646080507 +0200 +++ /var/tmp/diff_new_pack.Mmhz2J/_new 2025-05-09 18:51:45.650080674 +0200 @@ -19,7 +19,7 @@ %define modname evdev %{?sle15_python_module_pythons} Name: python-evdev -Version: 1.9.1 +Version: 1.9.2 Release: 0 Summary: Python bindings to the Linux input handling subsystem License: BSD-3-Clause ++++++ python-evdev-1.9.1.tar.gz -> python-evdev-1.9.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/docs/changelog.rst new/python-evdev-1.9.2/docs/changelog.rst --- old/python-evdev-1.9.1/docs/changelog.rst 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/docs/changelog.rst 2025-05-01 21:15:19.000000000 +0200 @@ -1,8 +1,28 @@ Changelog --------- + +1.9.2 (May 01, 2025) +==================== + +- Add the "--reproducible" build option which removes the build date and used headers from the + generated ``ecodes.c``. Example usage:: + + python -m build --config-setting=--build-option='build_ecodes --reproducible' -n + +- Use ``Generic`` to set precise type for ``InputDevice.path``. + + +1.9.1 (Feb 22, 2025) +==================== + +- Fix fox missing ``UI_FF`` constants in generated ``ecodes.py``. + +- More type annotations. + + 1.9.0 (Feb 08, 2025) -================== +==================== - Fix for ``CPATH/C_INCLUDE_PATH`` being ignored during build. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/docs/conf.py new/python-evdev-1.9.2/docs/conf.py --- old/python-evdev-1.9.1/docs/conf.py 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/docs/conf.py 2025-05-01 21:15:19.000000000 +0200 @@ -65,7 +65,7 @@ # built documents. # # The full version, including alpha/beta/rc tags. -release = "1.9.1" +release = "1.9.2" # The short X.Y version. version = release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/pyproject.toml new/python-evdev-1.9.2/pyproject.toml --- old/python-evdev-1.9.1/pyproject.toml 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/pyproject.toml 2025-05-01 21:15:19.000000000 +0200 @@ -4,7 +4,7 @@ [project] name = "evdev" -version = "1.9.1" +version = "1.9.2" description = "Bindings to the Linux input handling subsystem" keywords = ["evdev", "input", "uinput"] readme = "README.md" @@ -36,7 +36,7 @@ ignore = ["E265", "E241", "F403", "F401", "E401", "E731"] [tool.bumpversion] -current_version = "1.9.1" +current_version = "1.9.2" commit = true tag = true allow_dirty = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/setup.py new/python-evdev-1.9.2/setup.py --- old/python-evdev-1.9.1/setup.py 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/setup.py 2025-05-01 21:15:19.000000000 +0200 @@ -14,7 +14,7 @@ ecodes_c_path = curdir / "src/evdev/ecodes.c" -def create_ecodes(headers=None): +def create_ecodes(headers=None, reproducible=False): if not headers: include_paths = set() cpath = os.environ.get("CPATH", "").strip() @@ -65,7 +65,10 @@ print("writing %s (using %s)" % (ecodes_c_path, " ".join(headers))) with ecodes_c_path.open("w") as fh: - cmd = [sys.executable, "src/evdev/genecodes_c.py", "--ecodes", *headers] + cmd = [sys.executable, "src/evdev/genecodes_c.py"] + if reproducible: + cmd.append("--reproducible") + cmd.extend(["--ecodes", *headers]) run(cmd, check=True, stdout=fh) @@ -74,17 +77,21 @@ user_options = [ ("evdev-headers=", None, "colon-separated paths to input subsystem headers"), + ("reproducible", None, "hide host details (host/paths) to create a reproducible output"), ] def initialize_options(self): self.evdev_headers = None + self.reproducible = False def finalize_options(self): if self.evdev_headers: self.evdev_headers = self.evdev_headers.split(":") + if self.reproducible is None: + self.reproducible = False def run(self): - create_ecodes(self.evdev_headers) + create_ecodes(self.evdev_headers, reproducible=self.reproducible) class build_ext(_build_ext.build_ext): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/src/evdev/device.py new/python-evdev-1.9.2/src/evdev/device.py --- old/python-evdev-1.9.1/src/evdev/device.py 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/src/evdev/device.py 2025-05-01 21:15:19.000000000 +0200 @@ -1,6 +1,6 @@ import contextlib import os -from typing import Dict, Iterator, List, Literal, NamedTuple, Tuple, Union, overload +from typing import Dict, Generic, Iterator, List, Literal, NamedTuple, Tuple, TypeVar, Union, overload from . import _input, ecodes, util @@ -9,6 +9,8 @@ except ImportError: from .eventio import EvdevError, EventIO +_AnyStr = TypeVar("_AnyStr", str, bytes) + class AbsInfo(NamedTuple): """Absolute axis information. @@ -100,14 +102,14 @@ return msg.format(*self) # pylint: disable=not-an-iterable -class InputDevice(EventIO): +class InputDevice(EventIO, Generic[_AnyStr]): """ A linux input device from which input events can be read. """ __slots__ = ("path", "fd", "info", "name", "phys", "uniq", "_rawcapabilities", "version", "ff_effects_count") - def __init__(self, dev: Union[str, bytes, os.PathLike]): + def __init__(self, dev: Union[_AnyStr, "os.PathLike[_AnyStr]"]): """ Arguments --------- @@ -116,7 +118,7 @@ """ #: Path to input device. - self.path = dev if not hasattr(dev, "__fspath__") else dev.__fspath__() + self.path: _AnyStr = dev if not hasattr(dev, "__fspath__") else dev.__fspath__() # Certain operations are possible only when the device is opened in read-write mode. try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/src/evdev/genecodes_c.py new/python-evdev-1.9.2/src/evdev/genecodes_c.py --- old/python-evdev-1.9.1/src/evdev/genecodes_c.py 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/src/evdev/genecodes_c.py 2025-05-01 21:15:19.000000000 +0200 @@ -15,22 +15,27 @@ "/usr/include/linux/uinput.h", ] -opts, args = getopt.getopt(sys.argv[1:], "", ["ecodes", "stubs"]) +opts, args = getopt.getopt(sys.argv[1:], "", ["ecodes", "stubs", "reproducible"]) if not opts: - print("usage: genecodes.py [--ecodes|--stubs] <headers>") + print("usage: genecodes.py [--ecodes|--stubs] [--reproducible] <headers>") exit(2) if args: headers = args +reproducible = ("--reproducible", "") in opts + # ----------------------------------------------------------------------------- macro_regex = r"#define\s+((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF|INPUT_PROP)_\w+)" macro_regex = re.compile(macro_regex) -# Uname without hostname. -uname = list(os.uname()) -uname = " ".join((uname[0], *uname[2:])) +if reproducible: + uname = "hidden for reproducibility" +else: + # Uname without hostname. + uname = list(os.uname()) + uname = " ".join((uname[0], *uname[2:])) # ----------------------------------------------------------------------------- @@ -138,5 +143,5 @@ template = template_stubs body = os.linesep.join(body) -text = template % (uname, headers, body) +text = template % (uname, headers if not reproducible else ["hidden for reproducibility"], body) print(text.strip()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-evdev-1.9.1/src/evdev/util.py new/python-evdev-1.9.2/src/evdev/util.py --- old/python-evdev-1.9.1/src/evdev/util.py 2025-02-22 12:04:37.000000000 +0100 +++ new/python-evdev-1.9.2/src/evdev/util.py 2025-05-01 21:15:19.000000000 +0200 @@ -6,7 +6,7 @@ from typing import Union, List from . import ecodes -from .events import InputEvent, event_factory +from .events import InputEvent, event_factory, KeyEvent, RelEvent, AbsEvent, SynEvent def list_devices(input_device_dir: Union[str, bytes, os.PathLike] = "/dev/input") -> List[str]: @@ -32,7 +32,7 @@ return True -def categorize(event: InputEvent) -> InputEvent: +def categorize(event: InputEvent) -> Union[InputEvent, KeyEvent, RelEvent, AbsEvent, SynEvent]: """ Categorize an event according to its type.