diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index a1ebbc32a..25a008e60 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -15,8 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + include: + # Python 3.14 is allowed to fail due to PySpark incompatibility (segfaults in cloudpickle) + # Tests run for diagnostic purposes but don't block CI + - python-version: "3.14" + experimental: true fail-fast: false + continue-on-error: ${{ matrix.experimental || false }} steps: - uses: actions/checkout@v4 diff --git a/pointblank/_typing.py b/pointblank/_typing.py index c8cbd56c2..09295d11f 100644 --- a/pointblank/_typing.py +++ b/pointblank/_typing.py @@ -26,12 +26,40 @@ SegmentSpec = Union[str, SegmentTuple, List[SegmentItem]] # Add docstrings for better IDE support -AbsoluteBounds.__doc__ = "Absolute bounds (i.e., plus or minus)" -RelativeBounds.__doc__ = "Relative bounds (i.e., plus or minus some percent)" -Tolerance.__doc__ = "Tolerance (i.e., the allowed deviation)" -SegmentValue.__doc__ = "Value(s) that can be used in a segment tuple" -SegmentTuple.__doc__ = "(column, value(s)) format for segments" -SegmentItem.__doc__ = "Individual segment item (string or tuple)" -SegmentSpec.__doc__ = ( - "Full segment specification options (i.e., all options for segment specification)" -) +# In Python 3.14+, __doc__ attribute on typing.Union objects became read-only +try: + AbsoluteBounds.__doc__ = "Absolute bounds (i.e., plus or minus)" +except AttributeError: + pass + +try: + RelativeBounds.__doc__ = "Relative bounds (i.e., plus or minus some percent)" +except AttributeError: + pass + +try: + Tolerance.__doc__ = "Tolerance (i.e., the allowed deviation)" +except AttributeError: + pass + +try: + SegmentValue.__doc__ = "Value(s) that can be used in a segment tuple" +except AttributeError: + pass + +try: + SegmentTuple.__doc__ = "(column, value(s)) format for segments" +except AttributeError: + pass + +try: + SegmentItem.__doc__ = "Individual segment item (string or tuple)" +except AttributeError: + pass + +try: + SegmentSpec.__doc__ = ( + "Full segment specification options (i.e., all options for segment specification)" + ) +except AttributeError: + pass