cfl-common 8.9.20__py3-none-any.whl → 8.9.21__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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfl-common
3
- Version: 8.9.20
3
+ Version: 8.9.21
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Operating System :: OS Independent
6
6
  Requires-Dist: asgiref==3.11.1; python_version >= "3.9"
@@ -9,16 +9,16 @@ Requires-Dist: cffi==2.0.0; platform_python_implementation != "PyPy"
9
9
  Requires-Dist: charset-normalizer==3.4.4; python_version >= "3.7"
10
10
  Requires-Dist: cryptography==44.0.1; python_version >= "3.7" and python_full_version not in "3.9.0, 3.9.1"
11
11
  Requires-Dist: diff-match-patch==20241021; python_version >= "3.7"
12
- Requires-Dist: django==5.1.15; python_version >= "3.10"
12
+ Requires-Dist: django==5.2.11; python_version >= "3.10"
13
13
  Requires-Dist: django-countries==7.6.1
14
14
  Requires-Dist: django-csp==3.8
15
15
  Requires-Dist: django-formtools==2.5.1; python_version >= "3.8"
16
16
  Requires-Dist: django-import-export==4.2.0; python_version >= "3.9"
17
17
  Requires-Dist: django-otp==1.7.0; python_version >= "3.8"
18
18
  Requires-Dist: django-phonenumber-field==8.4.0; python_version >= "3.10"
19
- Requires-Dist: django-pipeline==4.0.0; python_version >= "3.9"
20
- Requires-Dist: django-two-factor-auth==1.17.0; python_version >= "3.8"
21
- Requires-Dist: djangorestframework==3.16.0; python_version >= "3.9"
19
+ Requires-Dist: django-pipeline==4.1.0; python_version >= "3.9"
20
+ Requires-Dist: django-two-factor-auth==1.18.1; python_version >= "3.9"
21
+ Requires-Dist: djangorestframework==3.16.1; python_version >= "3.9"
22
22
  Requires-Dist: idna==3.11; python_version >= "3.8"
23
23
  Requires-Dist: libsass==0.23.0; python_version >= "3.8"
24
24
  Requires-Dist: more-itertools==8.7.0; python_version >= "3.5"
@@ -29,9 +29,8 @@ Requires-Dist: pgeocode==0.4.0; python_version >= "3.8"
29
29
  Requires-Dist: psycopg2-binary==2.9.9; python_version >= "3.7"
30
30
  Requires-Dist: pycparser==3.0; implementation_name != "PyPy"
31
31
  Requires-Dist: pyjwt==2.6.0; python_version >= "3.7"
32
- Requires-Dist: pypng==0.20220715.0
33
32
  Requires-Dist: python-dateutil==2.9.0.post0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
34
- Requires-Dist: qrcode==7.4.2; python_version >= "3.7"
33
+ Requires-Dist: qrcode==8.2; python_version >= "3.9" and python_version < "4.0"
35
34
  Requires-Dist: requests==2.32.5; python_version >= "3.9"
36
35
  Requires-Dist: setuptools==80.10.2; python_version >= "3.9"
37
36
  Requires-Dist: six==1.17.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
@@ -11,7 +11,7 @@ common/fixtures/aimmo_characters.json,sha256=LqjwI05-H4heSBxl6_hS-nb3gMN_4SNVlDn
11
11
  common/fixtures/aimmo_characters2.json,sha256=R-23mbjLrvpH4G9khXKcu7PTDK86xf9eHf2HfFTp6us,1285
12
12
  common/fixtures/aimmo_characters3.json,sha256=7Pv_6DFastPzmM86sPx6D60Y8Biq84GLL5pWz5NGSUA,1392
13
13
  common/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- common/helpers/data_migration_loader.py,sha256=_BhS5lPmhcuVUbryBmJytlWdHyT02KYyxPkHar32mOE,1748
14
+ common/helpers/data_migration_loader.py,sha256=_uM2SZpWuyQO-SqQkQlE1GPrsNXIVLgCeJiULDP7csc,1938
15
15
  common/helpers/emails.py,sha256=wBgwTsOQSDIEFGZ3SS4N5XZO9nlwuCVzsjvgH4NNUkc,12060
16
16
  common/helpers/generators.py,sha256=kTL5e91I8wgmjJ-mu4jr9vIacjccUZ5pZSAz5cUNhdM,1505
17
17
  common/helpers/organisation.py,sha256=e-JKumKoXrkMTzZPv0H4ViWL8vtCt7oXJjn_zZ1ec00,427
@@ -93,7 +93,7 @@ common/tests/utils/organisation.py,sha256=vNgKFtU3VPcWRnZfh82yCS90PLAK1XTYJNIxGw
93
93
  common/tests/utils/student.py,sha256=GYOyd2VH6QXjjLzjCh4hpT86U5si2URlJJWZwlCVLrU,3846
94
94
  common/tests/utils/teacher.py,sha256=KQ_NAl4yQqiX_zwcULQjkovc29JPhnkLR5Nk3Ljzbpg,2661
95
95
  common/tests/utils/user.py,sha256=NvLzZLVP4jy5Hn1iztOYF_BTQ9WsbSmuWMEzGzhAsRU,919
96
- cfl_common-8.9.20.dist-info/METADATA,sha256=9sJTg1vz7vkROU2fNbR4ceU0uZ5egPmWoimE5e5iYdw,2535
97
- cfl_common-8.9.20.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
98
- cfl_common-8.9.20.dist-info/top_level.txt,sha256=LOtYx8KZTmnxM_zLK4rwrcI3PRc40Ihwp5rgaQ-ceaI,7
99
- cfl_common-8.9.20.dist-info/RECORD,,
96
+ cfl_common-8.9.21.dist-info/METADATA,sha256=RK7PK6vcThpmBS_uzL3CG1RooR-So7Dp2BsDLh5jzpI,2525
97
+ cfl_common-8.9.21.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
98
+ cfl_common-8.9.21.dist-info/top_level.txt,sha256=LOtYx8KZTmnxM_zLK4rwrcI3PRc40Ihwp5rgaQ-ceaI,7
99
+ cfl_common-8.9.21.dist-info/RECORD,,
@@ -2,7 +2,8 @@ from pathlib import Path
2
2
  from typing import Callable
3
3
 
4
4
  from django.core.management import call_command
5
- from django.core.serializers import base, python
5
+ from django.core.serializers import base
6
+ from django.core.serializers.python import Deserializer
6
7
 
7
8
 
8
9
  def load_data_from_file(file_name) -> Callable:
@@ -16,27 +17,27 @@ def load_data_from_file(file_name) -> Callable:
16
17
  absolute_file_path = Path(__file__).resolve().parent.parent / "fixtures" / file_name
17
18
 
18
19
  def _load_fixture(apps, schema_editor):
19
- # Save the default _get_model() function
20
- default_get_model = python._get_model
20
+ # Save the default _get_model_from_node() function
21
+ default_get_model_from_node = Deserializer._get_model_from_node
21
22
 
22
23
  # Define new _get_model() function here, which utilizes the apps argument to
23
24
  # get the historical version of a model. This piece of code is directly taken
24
- # from django.core.serializers.python._get_model, unchanged. However, here it
25
+ # from django.core.serializers.python._get_model_from_node, unchanged. However, here it
25
26
  # has a different context, specifically, the apps variable.
26
- def _get_model(model_identifier):
27
+ def _get_model_from_node(model_identifier):
27
28
  try:
28
29
  return apps.get_model(model_identifier)
29
30
  except (LookupError, TypeError):
30
31
  raise base.DeserializationError("Invalid model identifier: '%s'" % model_identifier)
31
32
 
32
- # Replace the _get_model() function on the module, so loaddata can utilize it.
33
- python._get_model = _get_model
33
+ # Replace the _get_model_from_node() function on the module, so loaddata can utilize it.
34
+ Deserializer._get_model_from_node = staticmethod(_get_model_from_node)
34
35
 
35
36
  try:
36
37
  # Call loaddata command
37
38
  call_command("loaddata", absolute_file_path, app_label="common")
38
39
  finally:
39
- # Restore default _get_model() function
40
- python._get_model = default_get_model
40
+ # Restore default _get_model_from_node() function
41
+ Deserializer._get_model_from_node = default_get_model_from_node
41
42
 
42
43
  return _load_fixture