Skip to content

Add encryption support for nested dicts and lists#78

Merged
brondsem merged 3 commits intoTurboGears:masterfrom
jcarlosdev:custom-encrypted-properties
Apr 7, 2026
Merged

Add encryption support for nested dicts and lists#78
brondsem merged 3 commits intoTurboGears:masterfrom
jcarlosdev:custom-encrypted-properties

Conversation

@jcarlosdev
Copy link
Copy Markdown
Contributor

  • Added new field definition classes for complex types
  • Complex types refer to dictionaries, lists nested into dictionaries, lists, lists of dictionaries and primitive types, both top-level and with any level of nesting
  • NestedEncryptedField can be used to define field level encryption on nested complex types for schemas that inherit from the Document class
  • NestedEncryptedProperty can be used to define field level encryption on nested complex types for schemas that inherit from the MappedClass class
  • Updated encryption functions to support dictionaries and lists.
  • Added test coverage for the new encrypted types

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 87.84810% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.25%. Comparing base (637a033) to head (2b71bf0).
⚠️ Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
ming/encryption.py 77.77% 92 Missing ⚠️
ming/tests/test_encryption.py 99.17% 3 Missing ⚠️
ming/metadata.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
+ Coverage   90.19%   91.25%   +1.05%     
==========================================
  Files          43       47       +4     
  Lines        6724     7966    +1242     
==========================================
+ Hits         6065     7269    +1204     
- Misses        659      697      +38     
Flag Coverage Δ
tests-3.10 91.39% <87.84%> (+1.01%) ⬆️
tests-3.11 91.39% <87.84%> (+1.01%) ⬆️
tests-3.12 91.39% <87.84%> (?)
tests-3.13 91.41% <87.84%> (?)
tests-3.14 91.41% <87.84%> (?)
tests-3.7 ?
tests-3.8 ?
tests-3.9 91.23% <87.84%> (+1.03%) ⬆️
tests-pypy3.9 91.34% <87.84%> (+1.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@brondsem brondsem merged commit 25495b9 into TurboGears:master Apr 7, 2026
16 checks passed
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