pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/py-svglib



Module Name:    pkgsrc
Committed By:   adam
Date:           Sun Aug  9 11:04:40 UTC 2026

Modified Files:
        pkgsrc/graphics/py-svglib: Makefile distinfo

Log Message:
py-svglib: updated to 2.1.0

2.1.0 (2026-08-01)

Added

- Declared support for **Python 3.14** (added the classifier and CI matrix
  entry across Ubuntu, macOS, and Windows, alongside the existing 3.9–3.13).
- **Clipping paths** now support `<circle>`, `<ellipse>`, and `<polygon>` clip
  shapes, in addition to paths and rectangles, and clipping masks referenced
  from within a `<use>` element.
- Transforms are now applied to clipping-path shapes, fixing clip paths that
  relied on previously unsupported transforms.
- The gradient shape classes now implement `getBounds()`, so drawings that
  contain gradient fills can be measured — for example when used as a flowable
  by rst2pdf.

Changed

- Renamed the gradient shape classes `_LinearGradientShape` and
  `_RadialGradientShape` to `LinearGradientShape` and `RadialGradientShape`.
  They appear in the rendered `Drawing` tree and were never meant to be
  private, so the leading underscore was misleading.

Removed

- Removed the deprecated `_LinearGradientShape` and `_RadialGradientShape`
  aliases. Use `LinearGradientShape` and `RadialGradientShape` instead.

Fixed

- The `visibility` property is now respected on shapes. Elements with
  `visibility="hidden"` (or `collapse`), set directly or inherited from an
  ancestor, were still rendered.

- `display: none` set through a `style` attribute is now respected. Only the
  `display` presentation attribute was read, so `<g style="display:none">` and
  `<rect style="display:none"/>` were still rendered.

- Embedded `<image>` geometry is no longer truncated to whole points. The
  `x`, `y`, `width`, and `height` of an SVG `<image>` were each passed through
  `int()`, so a raster placed at fractional coordinates landed up to ~1pt away
  from a vector element with identical coordinates. Because width/height were
  truncated too, the error grew across the image rather than being a constant
  shift.
- `font-family` values are now split per CSS instead of on whitespace. An
  unquoted multi-word name such as `font-family: Cascadia Code` was split into
  `Cascadia` and `Code`, so a font registered under its full name was never
  found. Commas inside a quoted name (`font-family: "Foo, Bar",
  Arial`) no longer split the list either; that previously handed `shlex` an
  unbalanced quote and raised `ValueError: No closing quotation`, aborting the
  conversion of a valid value.
- Replaced `locale.getdefaultlocale()` (used for `<switch>` `systemLanguage`
  matching) with a small environment-variable lookup. `getdefaultlocale()` is
  deprecated and is **removed in Python 3.15**; the replacement keeps the same
  behaviour, emits no deprecation warning on 3.12–3.14, and adds unit tests for
  the language-matching path.
- Clipping paths now support the `clip-rule` attribute instead of incorrectly
  using `fill-rule`.
- `fill="url(...)"` and gradient `xlink:href` values are now matched correctly
  when the referenced id is quoted (`url('#name')`, `url("#name")`) or
  contains a right parenthesis; the previous regex rejected or truncated
  these forms.
- Rendering to `reportlab.graphics.renderSVG.SVGCanvas` (as used by
  `easy-thumbnails[svg]`) no longer raises
  `AttributeError: 'SVGCanvas' object has no attribute 'beginPath'` when
  drawing a clipped gradient; that canvas doesn't implement `beginPath()`,
  so the gradient's clip path is now skipped on it instead of erroring.

Type safety and internal quality (no behavior change)

- Completed static type annotations for `svglib.py`; the package now passes
  `mypy --strict` on its own source, with a single documented per-module
  override for the untyped reportlab/cssselect2 base classes it subclasses.
- Pinned a `[tool.mypy]` configuration in `pyproject.toml` and now enforce mypy
  in CI (new `type-check.yml` workflow) and via a local pre-commit hook, so type
  regressions fail before merge.
- Tightened internal gradient handling types: parsed gradient definitions now
  use a `TypedDict` instead of an opaque `Dict[str, Any]`, and the internal
  group/parent parameters are typed as `Optional[Group]`.
- Added docstrings to the remaining undocumented functions in `svglib.py`,
  bringing documentation coverage to 100%.

Tooling and housekeeping

- Removed the DeepSource configuration. Its checks were redundant with ruff,
  `mypy --strict`, CodeQL, and the pytest matrix, and only produced recurring
  noise on pull requests.
- Removed the long-defunct `uniconv` sample tests. They contained no assertions
  and shelled out to UniConvertor, an abandoned Python 2 tool, so they had been
  permanently skipped.
- Fixed and revived the Windows CI workflow. It was a disabled placeholder that
  compiled GTK/Cairo from source (a ~20–40 minute step); it now runs a real
  CPython 3.9/3.13 matrix in well under a minute by dropping the source build
  and skipping the network-heavy sample tests on Windows (they already run on
  Ubuntu and macOS). The redundant manual Windows workflow was removed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/graphics/py-svglib/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/py-svglib/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/py-svglib/Makefile
diff -u pkgsrc/graphics/py-svglib/Makefile:1.3 pkgsrc/graphics/py-svglib/Makefile:1.4
--- pkgsrc/graphics/py-svglib/Makefile:1.3      Tue Jul 14 13:22:34 2026
+++ pkgsrc/graphics/py-svglib/Makefile  Sun Aug  9 11:04:40 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2026/07/14 13:22:34 adam Exp $
+# $NetBSD: Makefile,v 1.4 2026/08/09 11:04:40 adam Exp $
 
-DISTNAME=      svglib-2.0.2
+DISTNAME=      svglib-2.1.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    graphics python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=s/svglib/}

Index: pkgsrc/graphics/py-svglib/distinfo
diff -u pkgsrc/graphics/py-svglib/distinfo:1.2 pkgsrc/graphics/py-svglib/distinfo:1.3
--- pkgsrc/graphics/py-svglib/distinfo:1.2      Tue Jul 14 13:22:34 2026
+++ pkgsrc/graphics/py-svglib/distinfo  Sun Aug  9 11:04:40 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.2 2026/07/14 13:22:34 adam Exp $
+$NetBSD: distinfo,v 1.3 2026/08/09 11:04:40 adam Exp $
 
-BLAKE2s (svglib-2.0.2.tar.gz) = 6a89746f689dfe68d88a09aa78243e7c99d0fb8562530a3010e16402f85acb43
-SHA512 (svglib-2.0.2.tar.gz) = 695bd1aa17cd590c2d3bb5a4745d253d52b34f330c717c32ebaa8dceb13b5e442346f4fc848f962f16aa22cf6a2bde0eed2ef1466b76d7eb519487fab0fa3609
-Size (svglib-2.0.2.tar.gz) = 1341040 bytes
+BLAKE2s (svglib-2.1.0.tar.gz) = 8bf9f864acd79b4968beb3faeae1f33223e44de7adf6c1f4c8627791bf0bb3b6
+SHA512 (svglib-2.1.0.tar.gz) = c2b06501e8d70ce840d9390f71ed5676eb12e5ba6619b5eeb76db00f047cb16493c2e7cc36d98db9463dcd8289c797be181cca9c46ae6c52aff49b27c2b12d03
+Size (svglib-2.1.0.tar.gz) = 1371234 bytes



Home | Main Index | Thread Index | Old Index