Skip to content

Conversation

@otetard
Copy link
Contributor

@otetard otetard commented Oct 30, 2025

Test pySigma with Python 3.14 in the test GitHub Actions workflow and update code to support Python 3.14.


Changes:

  • bool(NotImplemented) used to return True with Python<3.14 with a deprecation warning, now it returns an explicit exception (TypeError: NotImplemented should not be used in a boolean context).
  • __annotations__ cannot be used with objects, but only with classes in Python 3.14, use type() to access the class definition.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates pySigma to support Python 3.13 and 3.14, while fixing compatibility issues with these versions. It addresses changes in Python's behavior around __annotations__ attribute access and bool(NotImplemented) conversion.

  • Fixed __annotations__ access to use type(self).__annotations__ instead of self.__annotations__ for proper attribute resolution in class hierarchies
  • Added exception handling for TypeError when calling comparison operators that may return NotImplemented in Python 3.14
  • Updated PyYAML dependency to version 6.0.3 for Python 3.13/3.14 compatibility

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sigma/types.py Fixed __annotations__ access in to_plain() method to use class-level annotations
sigma/processing/transformations/values.py Fixed __annotations__ access in RegexTransformation and CaseTransformation validation
sigma/processing/conditions/rule.py Added TypeError exception handling for comparison operations returning NotImplemented
pyproject.toml Added Python 3.13 and 3.14 classifiers, updated pyyaml minimum version to 6.0.3
poetry.lock Updated PyYAML package lock entries to version 6.0.3
.github/workflows/test.yml Added Python 3.14 to CI test matrix

@thomaspatzke thomaspatzke merged commit a08dcec into SigmaHQ:main Nov 2, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants