Skip to content

8.7.0#579

Open
seperman wants to merge 9 commits intomasterfrom
dev
Open

8.7.0#579
seperman wants to merge 9 commits intomasterfrom
dev

Conversation

@seperman
Copy link
Owner

  • Adding support for python 3.14

ljames8 and others added 9 commits September 24, 2025 19:30
Fix logarithmic_similarity return type hint
…e when serializing integers

  larger than 9223372036854775807 (2^63-1) or smaller than -9223372036854775808 (-2^63). This is an
  orjson limitation since it only supports signed 64-bit integers natively.

  Fix in deepdiff/serialization.py:
  1. Added _convert_oversized_ints() helper (line ~739) that recursively walks a data structure and
  converts any integer outside the signed 64-bit range to a string.
  2. Wrapped the orjson.dumps() call in a try/except — on the specific "Integer exceeds 64-bit range"
   TypeError, the data is pre-processed through _convert_oversized_ints() and retried.

  Tests added in tests/test_serialization.py:
  - test_json_dumps_large_int_exceeding_64bit — basic case with a large positive int
  - test_json_dumps_large_int_in_nested_structure — large int nested inside dicts
  - test_json_dumps_large_negative_int — large negative int
… calling

  type(obj)(converted_list) to reconstruct them. This fails because NamedTuple constructors require
  positional arguments matching their field definitions, not a single list.

  Solution: Before reconstructing a tuple subclass, check for the _fields attribute (the NamedTuple
  marker). If present, reconstruct via type(obj)(**dict(zip(obj._fields, converted))) so each field
  is passed by keyword. Plain tuples and lists continue to use the original path.
… it returned a

  dict containing opaque DiffLevel objects rather than a readable Python dictionary. The
  workaround was to_dict(view_override='text'), but that was locked to whatever verbose_level was
   set at init time (default 1), meaning you couldn't get the full detail that the tree view had
  access to.

  Change: Replaced the view_override parameter with verbose_level on both to_dict() and
  to_json(). These methods now always produce a text-view dictionary — an actual usable Python
  dict. The default verbosity is context-aware:

  - If the original view is 'text': uses the verbose_level from initialization (preserving
  existing behavior).
  - If the original view is 'tree': defaults to verbose_level=2 (the most detailed output), since
   tree-view users chose that view for its richness.

  In both cases, you can override the verbosity explicitly: to_dict(verbose_level=0),
  to_dict(verbose_level=1), etc.
  - pyproject.toml: requires-python changed to >=3.10, removed 3.9 classifier, cleaned up all
  python_version < '3.10' / python_version >= '3.10' conditional dependencies (coverage, click,
  numpy, orjson, polars, pytest, pytest-cov, python-dotenv)
  - .github/workflows/main.yaml: Removed 3.9 from matrix, added 3.14, changed DEFAULT_PYTHON and
  all conditional checks from 3.12 to 3.14
  - noxfile.py: Removed 3.9, added 3.14 to pytest session
  - README.md: Updated to "Python 3.10+" and added "Dropping support for Python 3.9" to What is
  New
  - CLAUDE.md: Updated to "3.10+"
  - .github/ISSUE_TEMPLATE/bug_report.md: Updated example version from 3.9.12 to 3.10.12

  Changelog/docs updates:
  - CHANGELOG.md: Added "Dropping support for Python 3.9" to v8-7-0
  - docs/changelog.rst: Added "Dropping support for Python 3.9" to v8-7-0
  - docs/index.rst: Added new 8-7-0 section with all its entries (matching the pattern of
  existing version sections)
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.05%. Comparing base (60ac5b9) to head (467e5ec).

Files with missing lines Patch % Lines
deepdiff/serialization.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #579      +/-   ##
==========================================
- Coverage   96.08%   96.05%   -0.04%     
==========================================
  Files          16       16              
  Lines        4474     4460      -14     
==========================================
- Hits         4299     4284      -15     
- Misses        175      176       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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