python-redlines 2.0.0__py3-none-any.whl → 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2024-present U.N. Owen <void@some.where>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "2.0.0"
4
+ __version__ = "3.0.0"
@@ -162,10 +162,11 @@ class BaseEngine(object):
162
162
 
163
163
  Additional keyword arguments are passed to _build_command() for engine-specific
164
164
  options. DocxodusEngine supports: case_insensitive, detect_moves,
165
- move_similarity_threshold, move_minimum_word_count, detect_format_changes,
166
- conflate_spaces, date_time. It raises ValueError for unrecognised settings and
167
- for the WmlComparer-era settings removed in Docxodus v11.0.0 (engine,
168
- detail_threshold, simplify_move_markup). XmlPowerToolsEngine ignores kwargs.
165
+ move_similarity_threshold, move_minimum_word_count, minimum_anchor_word_count,
166
+ detect_format_changes, conflate_spaces, date_time. It raises ValueError for
167
+ unrecognised settings and for the WmlComparer-era settings removed in Docxodus
168
+ v11.0.0 (engine, detail_threshold, simplify_move_markup). XmlPowerToolsEngine
169
+ ignores kwargs.
169
170
  """
170
171
  scratch_files = []
171
172
  try:
@@ -288,6 +289,7 @@ class DocxodusEngine(BaseEngine):
288
289
  _VALUE_FLAGS = [
289
290
  ('move_similarity_threshold', '--move-similarity-threshold'),
290
291
  ('move_minimum_word_count', '--move-minimum-word-count'),
292
+ ('minimum_anchor_word_count', '--minimum-anchor-word-count'),
291
293
  ('date_time', '--date-time'),
292
294
  ]
293
295
 
@@ -322,6 +324,12 @@ class DocxodusEngine(BaseEngine):
322
324
  if not isinstance(val, int) or val < 1:
323
325
  raise ValueError(f"move_minimum_word_count must be a positive integer, got {val!r}")
324
326
 
327
+ if 'minimum_anchor_word_count' in kwargs:
328
+ val = kwargs['minimum_anchor_word_count']
329
+ # bool is an int subclass, but would reach the CLI as "True".
330
+ if isinstance(val, bool) or not isinstance(val, int) or val < 0:
331
+ raise ValueError(f"minimum_anchor_word_count must be a non-negative integer, got {val!r}")
332
+
325
333
  def _build_command(self, author_tag, original_path, modified_path, target_path, **kwargs):
326
334
  self._validate_kwargs(kwargs)
327
335
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-redlines
3
- Version: 2.0.0
4
- Summary: Open-source DOCX comparison tool to generate native Word tracked changes (redlines) in Python without MS Word dependencies.
3
+ Version: 3.0.0
4
+ Summary: Open-source DOCX comparison tool, powered by the Docxodus engine, to generate native Word tracked changes (redlines) in Python without MS Word dependencies.
5
5
  Project-URL: Homepage, https://github.com/JSv4/Python-Redlines
6
6
  Project-URL: Documentation, https://jsv4.github.io/Python-Redlines/
7
7
  Project-URL: Demo, https://redlines.opensource.legal
@@ -13,20 +13,20 @@ Keywords: compare-word-documents,diff,docx,docx-comparison,docxodus,legal-tech,o
13
13
  Classifier: Development Status :: 5 - Production/Stable
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Programming Language :: Python
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
16
  Classifier: Programming Language :: Python :: 3.11
19
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Programming Language :: Python :: Implementation :: CPython
21
- Requires-Python: >=3.9
21
+ Requires-Python: >=3.11
22
22
  Requires-Dist: platformdirs>=3.0
23
23
  Provides-Extra: all
24
- Requires-Dist: python-redlines-docxodus==2.0.0; extra == 'all'
25
- Requires-Dist: python-redlines-ooxmlpowertools==2.0.0; extra == 'all'
24
+ Requires-Dist: python-redlines-docxodus==3.0.0; extra == 'all'
25
+ Requires-Dist: python-redlines-ooxmlpowertools==3.0.0; extra == 'all'
26
26
  Provides-Extra: docxodus
27
- Requires-Dist: python-redlines-docxodus==2.0.0; extra == 'docxodus'
27
+ Requires-Dist: python-redlines-docxodus==3.0.0; extra == 'docxodus'
28
28
  Provides-Extra: ooxmlpowertools
29
- Requires-Dist: python-redlines-ooxmlpowertools==2.0.0; extra == 'ooxmlpowertools'
29
+ Requires-Dist: python-redlines-ooxmlpowertools==3.0.0; extra == 'ooxmlpowertools'
30
30
  Description-Content-Type: text/markdown
31
31
 
32
32
  # python-redlines
@@ -68,10 +68,12 @@ version as the wrapper. For older releases, pin both packages explicitly (for
68
68
  example, `python-redlines[docxodus]==0.3.0` and
69
69
  `python-redlines-docxodus==0.3.0`). Existing published metadata is unchanged.
70
70
 
71
- 2.0.0 bundles Docxodus v14.1.0. Python call signatures and supported settings
72
- are unchanged from 1.0.0, but comparison markup and revision granularity can differ.
71
+ 3.0.0 bundles Docxodus v17.0.0 and adds one setting, `minimum_anchor_word_count`.
72
+ Existing call signatures and settings are unchanged from 2.0.0, but comparison markup
73
+ and revision counts can differ, and some very deeply nested documents are now refused.
74
+ It requires Python 3.11 or newer; 2.0.0 was the last release to support 3.9 and 3.10.
73
75
  Review representative redlines when upgrading; see the
74
- [2.0.0 migration guide](https://github.com/JSv4/Python-Redlines#upgrading-to-200).
76
+ [3.0.0 migration guide](https://github.com/JSv4/Python-Redlines#upgrading-to-300).
75
77
 
76
78
  An unsuccessful engine exit raises `EngineExecutionError`, a subclass of
77
79
  `subprocess.CalledProcessError`. Its message includes the captured stderr and
@@ -0,0 +1,6 @@
1
+ python_redlines/__about__.py,sha256=nWgO22hDJiotkPTVgp8C5cCKXyVKkq5krBNsu3cqGAg,122
2
+ python_redlines/__init__.py,sha256=0OBU8DqF4mTPMIOlQlbY4r7l-xo5nlHRGOly11Ugq2A,437
3
+ python_redlines/engines.py,sha256=BL0UZHibnK0FL3ruvpaPXbOIJya2FfvBrMuAX439IWA,14280
4
+ python_redlines-3.0.0.dist-info/METADATA,sha256=HctSO5vnLLjs5kA_SxIrjNSVse8CpPALJi04oYCknNI,4015
5
+ python_redlines-3.0.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
6
+ python_redlines-3.0.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.4
2
+ Generator: hatchling 1.33.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,6 +0,0 @@
1
- python_redlines/__about__.py,sha256=Fh5eqpAhiIOZkpbNkE8nqgWqIbmudP5vwr4gPo94lF8,122
2
- python_redlines/__init__.py,sha256=0OBU8DqF4mTPMIOlQlbY4r7l-xo5nlHRGOly11Ugq2A,437
3
- python_redlines/engines.py,sha256=JxfaxcWmbDhFYrorM7KaS1kAzTkovd2dAvUsg-JlmEE,13812
4
- python_redlines-2.0.0.dist-info/METADATA,sha256=EYUDsskazYG0f_16adhxMrm9eLMdBCyvbxz2f_wLjSQ,3802
5
- python_redlines-2.0.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
6
- python_redlines-2.0.0.dist-info/RECORD,,