Skip to content

Commit

Permalink
v1.4 compatibility fix
Browse files Browse the repository at this point in the history
Final release of v1.4 upgraded numpy to 2.1.1, causing xyset in parser to produce incorrect results sometimes. This fixes that
  • Loading branch information
burghoff committed Oct 15, 2024
1 parent 5d5acee commit fcf76c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scientific_inkscape/inkex1_3_0/inkex/text/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3930,4 +3930,5 @@ def xyset(elem, xyt, val):
if not (val):
elem.attrib.pop(xyt, None) # pylint: disable=no-member
else:
EBset(elem, xyt, str(val)[1:-1].replace(",", ""))
EBset(elem, xyt, ' '.join('%s' % v for v in val if v is not None))

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'1.2' : 'inkscape-1.2.2_2022-12-09_732a01da63-x64',
'1.3' : 'inkscape-1.3.1_2023-11-16_91b66b0783-x64',
'1.3e': 'inkscape-1.3_2023-07-21_0e150ed6c4-x64_extensions',
'1.4' : 'inkscape-1.4-beta2_2024-07-30_9aaf4f3498-x64',
'1.4' : 'inkscape-1.4_2024-10-11_86a8ad7-x64',
}
vpaths = {k: os.path.join(INKSAPES_LOCATION, v) for k,v in vpaths.items()}

Expand Down

0 comments on commit fcf76c4

Please sign in to comment.