clear-skies 1.22.25__py3-none-any.whl → 1.22.27__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 clear-skies might be problematic. Click here for more details.

@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: clear-skies
3
- Version: 1.22.25
3
+ Version: 1.22.27
4
4
  Summary: A framework for building backends in the cloud
5
- Home-page: https://github.com/cmancone/clearskies
6
5
  License: MIT
7
6
  Author: Conor Mancone
8
7
  Author-email: cmancone@gmail.com
@@ -27,7 +26,7 @@ Requires-Dist: jose (>=1.0.0,<2.0.0) ; extra == "jose"
27
26
  Requires-Dist: jwcrypto (>=1.5.6,<2.0.0) ; extra == "jwcrypto"
28
27
  Requires-Dist: pymysql (>=1.1.0,<2.0.0) ; extra == "mysql"
29
28
  Requires-Dist: requests (>=2.31.0,<3.0.0)
30
- Requires-Dist: typing-extensions (>=4.12.0,<5.0.0) ; python_version >= "3.10" and python_version < "3.11"
29
+ Requires-Dist: typing-extensions (>=4.12.0,<5.0.0) ; python_version == "3.10"
31
30
  Project-URL: Repository, https://github.com/cmancone/clearskies
32
31
  Description-Content-Type: text/markdown
33
32
 
@@ -1,6 +1,6 @@
1
1
  clearskies/__init__.py,sha256=Iz_VxSgiqM6VtGXoUsB_yVKFy_uWvcf071w803wJ8EE,832
2
2
  clearskies/application.py,sha256=_gYGIUGdVE5fAS9dwxRZ1gDpDjqGo7-twVt_VxI6XVE,966
3
- clearskies/authentication/__init__.py,sha256=UY72kSNfUOINCqd_X4SyizyTlPiAO_1MM30xvp5MpqY,1069
3
+ clearskies/authentication/__init__.py,sha256=XOfFDaSO9_TRchwUulOAxuk82zg7TrC_-KB4KsbpiOo,1073
4
4
  clearskies/authentication/auth0_jwks.py,sha256=bzqNaEoG_iPndwttRXuaKpgkDtgOCLAooyifl0I0ACI,4447
5
5
  clearskies/authentication/auth_exception.py,sha256=8Tay3Sim2K8vAZ6ldisSJyRyN0cwX7iyGHwfglSKW_A,41
6
6
  clearskies/authentication/authorization.py,sha256=eLzBrXMNr1gYoIBZTd8I6uH3R0CfMMjhvimkJt4Amrs,601
@@ -122,7 +122,7 @@ clearskies/decorators/security_headers.py,sha256=Spk53FL4epHDSLQeGNTWO9R6QC63psq
122
122
  clearskies/di/__init__.py,sha256=T7SgQNny2XAZQPeFkdmp1XxxmEVxtnpcRiGK8YflkwU,304
123
123
  clearskies/di/additional_config.py,sha256=PGWV-diJyqlx7WtYr4xV2Uo5W0-f4rmwdPWJRXq6V_8,592
124
124
  clearskies/di/additional_config_auto_import.py,sha256=m57IODPbnCAus9iDu3mDp42u4H87oPZvjAlBGoS8uRQ,111
125
- clearskies/di/di.py,sha256=Yo-wxQTD8pPeBxmfraWs1-ripf_Jd_G82YvQOC2GhUc,15725
125
+ clearskies/di/di.py,sha256=0rM4flmoRsnQ4qqWw9EmtBy7EoB8DcfqxnfNZEO4Rhk,15591
126
126
  clearskies/di/standard_dependencies.py,sha256=4cxWRjru5uKLW_1IJHKAgVu2cqc9gPcV0vZVm4HQxNg,4764
127
127
  clearskies/di/test_module/__init__.py,sha256=7YHQF7JHP0FdI7GdEGANSZ_t1EISQYhUNm1wqOg0NKw,88
128
128
  clearskies/di/test_module/another_module/__init__.py,sha256=8SRmHPDepLKGWTUSc1ucDF6U8mJPsNDsBDmBQCpzPWo,35
@@ -157,7 +157,7 @@ clearskies/handlers/schema_helper.py,sha256=62644USvFlZu_6tT7rb-k6t_5J3Q0uZsJwP5
157
157
  clearskies/handlers/simple_routing.py,sha256=xMVfBas51pZOP8xvDmeH6L-iO6CGIrICyT5yUYceJOs,9550
158
158
  clearskies/handlers/simple_routing_route.py,sha256=vJYksR4UPWpPsMX6DhpBtCj5gyZOIytqZL-O6FKu4_c,9271
159
159
  clearskies/handlers/simple_search.py,sha256=bSfq8rzdqkBj-dTGUBSZ1EkfjzUWHID7mKD2xEf8VzQ,6165
160
- clearskies/handlers/update.py,sha256=iqVsCp8Xhzeto6OEGgQr8A4ip636M9cEVIzvdO_zmEM,4284
160
+ clearskies/handlers/update.py,sha256=oLPHT5m1eDHfRMgVDBmN81at__dN7v7f7VVypgiGlZs,4382
161
161
  clearskies/handlers/write.py,sha256=Gu1w1PQ1F7tlqCqALorMRek3UH6IkViPIO195dxPd8k,9372
162
162
  clearskies/input_outputs/__init__.py,sha256=mQWL-u41FRTrPGuHe8FhLmcHjAEaUxjFwUf7RgDcbAs,182
163
163
  clearskies/input_outputs/cli.py,sha256=ar2TeW-24BdCRbw9JFilZyJlZ2Qg34uwluutKx1XKSA,6694
@@ -208,7 +208,7 @@ clearskies/tests/simple_api/models/__init__.py,sha256=nUA0W6fgXw_Bxa9CudkaDkC80t
208
208
  clearskies/tests/simple_api/models/status.py,sha256=PEhPbaQh5qdUNHp8O0gz91LOLENAEBtqSaHxUPXchaM,699
209
209
  clearskies/tests/simple_api/models/user.py,sha256=5_P4Tp1tTdX7PkMJ__epPM5MA7JAeVYGas69vcWloLc,819
210
210
  clearskies/tests/simple_api/users_api.py,sha256=KYXCgEofDxHeRdQK67txN5oYUPvxxmB8JTku7L-apk4,2344
211
- clear_skies-1.22.25.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
212
- clear_skies-1.22.25.dist-info/METADATA,sha256=npujLxw9sA0vXJAuGaLIZ03KmowdcRzVc9xz1PhF0ek,1920
213
- clear_skies-1.22.25.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
214
- clear_skies-1.22.25.dist-info/RECORD,,
211
+ clear_skies-1.22.27.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
212
+ clear_skies-1.22.27.dist-info/METADATA,sha256=_F_I6SW9XdWb810gQAj81yFsccOu8csIoinyvh273Ww,1842
213
+ clear_skies-1.22.27.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
214
+ clear_skies-1.22.27.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -13,7 +13,7 @@ def public():
13
13
 
14
14
 
15
15
  def secret_bearer(**kwargs):
16
- return BindingConfig(SecretBearer, **kwargs)
16
+ return BindingConfig(SecretBearerAuth, **kwargs)
17
17
 
18
18
 
19
19
  def auth0_jwks(**kwargs):
clearskies/di/di.py CHANGED
@@ -138,8 +138,6 @@ class DI:
138
138
  return instance
139
139
  elif type(thing) == str:
140
140
  return self.build_from_name(thing, context=context, cache=cache)
141
- elif callable(thing):
142
- raise ValueError("build received a callable: you probably want to call di.call_function()")
143
141
 
144
142
  # if we got here then our thing is already and object of some sort and doesn't need anything further
145
143
  return thing
@@ -55,11 +55,8 @@ class Update(Write):
55
55
  if authorization and hasattr(authorization, "filter_models"):
56
56
  models = authorization.filter_models(models, input_output.get_authorization_data(), input_output)
57
57
  model = models.first()
58
- if not model.exists:
59
- if self._configuration.get("upsert"):
60
- input_data[id_column_name] = model_id
61
- else:
62
- return self.error(input_output, "Not Found", 404)
58
+ if not model.exists and not self._configuration.get("upsert"):
59
+ return self.error(input_output, "Not Found", 404)
63
60
  if model.exists and "id" in input_data:
64
61
  del input_data["id"]
65
62
 
@@ -69,6 +66,11 @@ class Update(Write):
69
66
  }
70
67
  if input_errors:
71
68
  raise InputError(input_errors)
69
+
70
+ # if we're doing the update part of an upsert, then we have to provide the expected model id
71
+ if not model.exists:
72
+ input_data[id_column_name] = model_id
73
+
72
74
  model.save(input_data, columns=self._get_writeable_columns())
73
75
 
74
76
  return self.success(input_output, self._model_as_json(model, input_output))