core-framework 0.12.12__py3-none-any.whl → 0.12.13__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.
core/__init__.py CHANGED
@@ -287,7 +287,7 @@ from core.exceptions import (
287
287
  MissingDependency,
288
288
  )
289
289
 
290
- __version__ = "0.12.12"
290
+ __version__ = "0.12.13"
291
291
  __all__ = [
292
292
  # Models
293
293
  "Model",
@@ -260,23 +260,10 @@ class CreateTable(Operation):
260
260
  return f"Create table '{self.table_name}'"
261
261
 
262
262
  def to_code(self) -> str:
263
- def serialize_default(val):
264
- """Serializa valor default para código Python válido."""
265
- if val is None:
266
- return "None"
267
- if callable(val):
268
- # Funções como datetime.utcnow não podem ser serializadas
269
- # Usamos None e deixamos o banco lidar com o default
270
- return "None"
271
- if isinstance(val, str):
272
- return f"'{val}'"
273
- if isinstance(val, bool):
274
- return str(val)
275
- return repr(val)
276
-
263
+ # Use global _serialize_default for consistent callable serialization
277
264
  cols = ",\n ".join(
278
265
  f"ColumnDef(name='{c.name}', type='{c.type}', nullable={c.nullable}, "
279
- f"default={serialize_default(c.default)}, primary_key={c.primary_key}, "
266
+ f"default={_serialize_default(c.default)}, primary_key={c.primary_key}, "
280
267
  f"autoincrement={c.autoincrement}, unique={c.unique})"
281
268
  for c in self.columns
282
269
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: core-framework
3
- Version: 0.12.12
3
+ Version: 0.12.13
4
4
  Summary: Core Framework - Django-inspired, FastAPI-powered. Alta performance, baixo acoplamento, produtividade extrema.
5
5
  Project-URL: Homepage, https://github.com/SorPuti/core-framework
6
6
  Project-URL: Documentation, https://github.com/SorPuti/core-framework#readme
@@ -1,4 +1,4 @@
1
- core/__init__.py,sha256=sN-fhPqBY9IE4xREiTdhDFB7hDSTn6zM3C2SNuDSV2c,12232
1
+ core/__init__.py,sha256=r4WjmhThQyLBWtdMdRPtmwvc_ksX_W7S5vQjkfYkSFA,12232
2
2
  core/app.py,sha256=SsMC5Vlj6PNgACXlfeccOm6CQEKfgh3q3X2p9ubRDlQ,23092
3
3
  core/choices.py,sha256=rhcL3p2dB7RK99zIilpmoTFVcibQEIaRpz0CY0kImCE,10502
4
4
  core/config.py,sha256=dq4O7QBdrdwj-fZRe2yhX1fKyi_Uetb6sx9-RovJ-9c,14771
@@ -65,7 +65,7 @@ core/migrations/analyzer.py,sha256=QiwG_Xf_-Mb-Kp4hstkF8xNJD0Tvxgz20vqvYZ6xEXM,2
65
65
  core/migrations/cli.py,sha256=mR3lIFTlXSvupFOPVlfuC-urJyDfNFR9nqYZn4TjIco,12019
66
66
  core/migrations/engine.py,sha256=jk8-wX8aKNBidUGyQ7ckHcUsukNJYpgSva-Sp-Iu-L4,31590
67
67
  core/migrations/migration.py,sha256=Xv5MSNLvGAR9wnuMc4GRwciUSuU22AxWlWZP-hsVliI,2748
68
- core/migrations/operations.py,sha256=0EfcrlYZpgi-xIDZJ_7UFfzRU0obMIBRTWXCGIm2h5A,29573
68
+ core/migrations/operations.py,sha256=K2LuETDJnDFdi2UTa6Z7hTs05ucAPEgHgaBHySY1Z3I,29102
69
69
  core/migrations/state.py,sha256=eb_EYTE1tG-xQIwliS_-QTgr0y8-Jj0Va4C3nfpMrd4,15324
70
70
  core/tasks/__init__.py,sha256=rDP4PD7Qtw8qbSbOtxMco9w2wBxRJl5uHiLUEDM0DYI,1662
71
71
  core/tasks/base.py,sha256=0EWEzWTez0iF6nlI7Aw3stZtBk0Cr7zZ9btI89YdWPU,11762
@@ -87,7 +87,7 @@ example/auth.py,sha256=zBpLutb8lVKnGfQqQ2wnyygsSutHYZzeJBuhnFhxBaQ,4971
87
87
  example/models.py,sha256=xKdx0kJ9n0tZ7sCce3KhV3BTvKvsh6m7G69eFm3ukf0,4549
88
88
  example/schemas.py,sha256=wJ9QofnuHp4PjtM_IuMMBLVFVDJ4YlwcF6uQm1ooKiY,6139
89
89
  example/views.py,sha256=GQwgQcW6yoeUIDbF7-lsaZV7cs8G1S1vGVtiwVpZIQE,14338
90
- core_framework-0.12.12.dist-info/METADATA,sha256=HE4OI9XsW2P2ygLM1zlZoig9Apek6lftiEDAY52PAEQ,13021
91
- core_framework-0.12.12.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
92
- core_framework-0.12.12.dist-info/entry_points.txt,sha256=MJytamxHbn0CyH3HbxiP-PqOWekjYUo2CA6EWiKWuSI,78
93
- core_framework-0.12.12.dist-info/RECORD,,
90
+ core_framework-0.12.13.dist-info/METADATA,sha256=yTAocMiU4__UMmo8YL_t8Uwg7i8_5NsX5J01_imP82M,13021
91
+ core_framework-0.12.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
92
+ core_framework-0.12.13.dist-info/entry_points.txt,sha256=MJytamxHbn0CyH3HbxiP-PqOWekjYUo2CA6EWiKWuSI,78
93
+ core_framework-0.12.13.dist-info/RECORD,,