morango 0.8.1__py2.py3-none-any.whl → 0.8.3__py2.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.

Potentially problematic release.


This version of morango might be problematic. Click here for more details.

morango/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.8.1"
1
+ __version__ = "0.8.3"
@@ -0,0 +1,21 @@
1
+ # Generated by Django 3.2.24 on 2024-10-18 23:18
2
+ from django.db import migrations
3
+ from django.db import models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ("morango", "0001_squashed_0024_auto_20240129_1757"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AddIndex(
14
+ model_name="store",
15
+ index=models.Index(
16
+ condition=models.Q(("dirty_bit", True)),
17
+ fields=["profile", "model_name", "partition", "dirty_bit"],
18
+ name="idx_morango_deserialize",
19
+ ),
20
+ ),
21
+ ]
morango/models/core.py CHANGED
@@ -450,6 +450,7 @@ class Store(AbstractStore):
450
450
  class Meta:
451
451
  indexes = [
452
452
  models.Index(fields=["partition"], name="idx_morango_store_partition"),
453
+ models.Index(fields=["profile", "model_name", "partition", "dirty_bit"], condition=models.Q(dirty_bit=True), name="idx_morango_deserialize"),
453
454
  ]
454
455
 
455
456
  def _deserialize_store_model(self, fk_cache, defer_fks=False): # noqa: C901
@@ -6,6 +6,7 @@ desirability/efficiency from left to right). We have a base ``Key`` class which
6
6
  """
7
7
  import hashlib
8
8
  import re
9
+ import sys
9
10
 
10
11
  import rsa as PYRSA
11
12
  from django.db import models
@@ -20,6 +21,16 @@ except ImportError:
20
21
  M2CRYPTO_EXISTS = False
21
22
 
22
23
  try:
24
+ # Pre-empt the PanicException that importing cryptography can cause
25
+ # when we are using a non-compatible version of cffi on Python 3.13
26
+ # this happens because of static depdendency bundling in Kolibri
27
+ import cffi
28
+
29
+ if sys.version_info > (3, 13):
30
+ if hasattr(cffi, "__version_info__"):
31
+ if cffi.__version_info__ < (1, 17, 1):
32
+ raise ImportError
33
+
23
34
  from cryptography.hazmat.backends import default_backend
24
35
  from cryptography import exceptions as crypto_exceptions
25
36
 
@@ -39,7 +50,13 @@ try:
39
50
  CRYPTOGRAPHY_EXISTS = True
40
51
  except ImportError:
41
52
  CRYPTOGRAPHY_EXISTS = False
42
-
53
+ except BaseException as e:
54
+ # Still catch PanicExceptions just in case.
55
+ if "Python API call failed" in str(e):
56
+ CRYPTOGRAPHY_EXISTS = False
57
+ else:
58
+ # Otherwise raise the error again to avoid silently catching other errors
59
+ raise
43
60
 
44
61
  from base64 import encodebytes as b64encode, decodebytes as b64decode
45
62
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: morango
3
- Version: 0.8.1
3
+ Version: 0.8.3
4
4
  Summary: Pure Python sqlite-based Django DB replication engine.
5
5
  Home-page: https://github.com/learningequality/morango
6
6
  Author: Learning Equality
@@ -19,15 +19,16 @@ Classifier: Programming Language :: Python :: 3.9
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
- Requires-Python: >=3.6, <3.13
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Requires-Python: >=3.6, <3.14
23
24
  Description-Content-Type: text/markdown
24
25
  License-File: LICENSE
25
26
  License-File: AUTHORS.md
26
- Requires-Dist: django <4,>=3
27
- Requires-Dist: django-mptt >0.10.0
28
- Requires-Dist: rsa <3.5,>=3.4.2
29
- Requires-Dist: djangorestframework >3.10
30
- Requires-Dist: django-ipware ==4.0.2
27
+ Requires-Dist: django<4,>=3
28
+ Requires-Dist: django-mptt>0.10.0
29
+ Requires-Dist: rsa<4.10
30
+ Requires-Dist: djangorestframework>3.10
31
+ Requires-Dist: django-ipware==4.0.2
31
32
  Requires-Dist: requests
32
33
  Requires-Dist: ifcfg
33
34
 
@@ -1,4 +1,4 @@
1
- morango/__init__.py,sha256=Ocl79hbbH8_jdr5dGC90VR1cAvZc05Rc0tkZttUnMjo,22
1
+ morango/__init__.py,sha256=otnwfmvJLUamPajTPUaIekiO9mA-2HPi-_h_E0N-uOQ,22
2
2
  morango/apps.py,sha256=bs_LaTt1038Oh0OOWqaZKpF8rL9cg8rqW4hftIILPw8,559
3
3
  morango/errors.py,sha256=okjt7FqSHIf3x9SmnmoW6aqNJ_g7Ye3Fx7tuQSNUYEI,1223
4
4
  morango/proquint.py,sha256=YRjgceaYD_wDE8R-21AK5m6MSzbarIBP_kDxJ_gHsbQ,3679
@@ -24,6 +24,7 @@ morango/management/commands/cleanupsyncs.py,sha256=Huaz8etLNbmW8X-Vy4x1QY801JYln
24
24
  morango/migrations/0001_initial.py,sha256=ZFEKusKCIUsgUuHpF-eWqEqu7FrhO2ikkfu5KfYfXx0,11892
25
25
  morango/migrations/0001_squashed_0024_auto_20240129_1757.py,sha256=K-71iKz9cKpb-zrxuoDJVWafZM3U_hM6EpX6aNzsFjM,21770
26
26
  morango/migrations/0002_auto_20170511_0400.py,sha256=9EQcTl2xHd-rwx_NWCLzo8GU3u7MFA3WOryyKYEbHUw,2263
27
+ morango/migrations/0002_store_idx_morango_deserialize.py,sha256=AbfcuoovuViGRugR5lH86E3JgfgBa_4koTp5vMiUAh8,568
27
28
  morango/migrations/0003_auto_20170519_0543.py,sha256=5YfHW6IcT57tgaXW6pnWHmL6kfgauTW2nao9zQr3nP8,641
28
29
  morango/migrations/0004_auto_20170520_2112.py,sha256=T7rGjSPXUGnanDr5SJKj5SHZEQYSIaND60vRaK3DObw,517
29
30
  morango/migrations/0005_auto_20170629_2139.py,sha256=PL1I3wybrDgDxY8hSmZmUfpxOulr6O2ywui7ue_dvKw,654
@@ -49,14 +50,14 @@ morango/migrations/0024_auto_20240129_1757.py,sha256=Buy1T4PiTFo8zP7p2HY-3gmiJur
49
50
  morango/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
51
  morango/models/__init__.py,sha256=ws6VwRPs7iKLRfFSuRpUESTZlGEmSk0Nv61chh-Gn2Q,1722
51
52
  morango/models/certificates.py,sha256=XVq6tKOwLZjq2hw0j5hrBQGsm5H-GSPZ5ZVOg9An9Hw,15110
52
- morango/models/core.py,sha256=dWSft-HFapnwQzdaycHnMeiE7x7Lr3lJRJl5To3LtXs,38608
53
+ morango/models/core.py,sha256=S7hfI8Bo60qvVr2Pr_VRnFUpSqAtV-WvBUDlk0dtWEE,38762
53
54
  morango/models/fsic_utils.py,sha256=B9RM-uPZFvEXWbsPeeit5qA21gKGpA0NkKCLFIdNI_0,7130
54
55
  morango/models/manager.py,sha256=fzzX7k8qV5W5dMBb0ASOBNRJRpvQZbEG1hgyuMtzt4g,163
55
56
  morango/models/query.py,sha256=eHcf9PYYEDShN6lRng7Ow9RJwNFPdKI1hDbVUXeyl9U,869
56
57
  morango/models/signals.py,sha256=R17Fqddbg2AgAVnH4oZPrDQMWi94R2XsLmnUbrgKS2I,478
57
58
  morango/models/utils.py,sha256=8J138TR3FkslovfUWkLLEpODieFtmHKne7Lm1I8iPXk,6588
58
59
  morango/models/fields/__init__.py,sha256=dzxg8-_v3irXkPnyCsiVDur0gG0RJfKzFcshjL6Y-9s,225
59
- morango/models/fields/crypto.py,sha256=Uyjqyt63ztwdaJ7-bftnu8TytSYqAdzFhzVKVeeP5a4,13842
60
+ morango/models/fields/crypto.py,sha256=Q_y7s-UpFEz9zXFaAkEDOmqwx4b19F7wbTafpd_XPp4,14509
60
61
  morango/models/fields/uuids.py,sha256=w7M8KlA8oLPascq14tcor89V92IGxx2XtdweS-0lF6A,4275
61
62
  morango/sync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
63
  morango/sync/context.py,sha256=_gqfE-RfTIn0UMKFeI2snIJEGCbmR_NRl-Ts5u35B7Q,17815
@@ -70,9 +71,9 @@ morango/sync/backends/base.py,sha256=zQP5hOB2Qw0qv0G00LXFHl2GQ3b0bheyujdNVl5rT-8
70
71
  morango/sync/backends/postgres.py,sha256=N0IeXN67AkdQKlD20b8LQZ1ocdarapL8pqu8FQAc6lM,19850
71
72
  morango/sync/backends/sqlite.py,sha256=vg7kWFIF346-NjVwexYfjYbrrOyzzvcCmk5uUkqhabw,12850
72
73
  morango/sync/backends/utils.py,sha256=UvyYByzRenOwtDvLPO_1wIOE8Yr88FnuAM2c4VSk7uQ,5145
73
- morango-0.8.1.dist-info/AUTHORS.md,sha256=9Ussd3Fq3RPjHyQT_3AyGss5jiVbn858WQuIBOi1ajI,276
74
- morango-0.8.1.dist-info/LICENSE,sha256=RkI6MjmrrTKa3aoPAVyk9QdeLZclcrKds6FH3phRSRU,1074
75
- morango-0.8.1.dist-info/METADATA,sha256=Gk6Hf00RGUrtBT2lQQ4oveoEf99Nj45m7CZ1XweAvkU,2546
76
- morango-0.8.1.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
77
- morango-0.8.1.dist-info/top_level.txt,sha256=pzREWN0EeEq3yHDRast9XI081Ow_rtcm7WV0ZQTlIPY,8
78
- morango-0.8.1.dist-info/RECORD,,
74
+ morango-0.8.3.dist-info/AUTHORS.md,sha256=9Ussd3Fq3RPjHyQT_3AyGss5jiVbn858WQuIBOi1ajI,276
75
+ morango-0.8.3.dist-info/LICENSE,sha256=RkI6MjmrrTKa3aoPAVyk9QdeLZclcrKds6FH3phRSRU,1074
76
+ morango-0.8.3.dist-info/METADATA,sha256=JOARsLSzdnUDHtk5_0NDG4W-PSkiVHylM2EpzRdaIn8,2585
77
+ morango-0.8.3.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
78
+ morango-0.8.3.dist-info/top_level.txt,sha256=pzREWN0EeEq3yHDRast9XI081Ow_rtcm7WV0ZQTlIPY,8
79
+ morango-0.8.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any