xcomponent 0.6.6__tar.gz → 0.6.7__tar.gz

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.
Files changed (76) hide show
  1. {xcomponent-0.6.6 → xcomponent-0.6.7}/CHANGELOG.md +4 -0
  2. {xcomponent-0.6.6 → xcomponent-0.6.7}/Cargo.lock +1 -1
  3. {xcomponent-0.6.6 → xcomponent-0.6.7}/Cargo.toml +1 -1
  4. {xcomponent-0.6.6 → xcomponent-0.6.7}/PKG-INFO +5 -5
  5. {xcomponent-0.6.6 → xcomponent-0.6.7}/README.md +3 -3
  6. {xcomponent-0.6.6 → xcomponent-0.6.7}/docs/source/user/getting_started.md +9 -0
  7. {xcomponent-0.6.6 → xcomponent-0.6.7}/pyproject.toml +2 -2
  8. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/ast/eval.rs +1 -0
  9. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_binary_eq.py +2 -0
  10. {xcomponent-0.6.6 → xcomponent-0.6.7}/uv.lock +1 -1
  11. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/build-sdist.yml +0 -0
  12. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/build-wheels.yml +0 -0
  13. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/publish-doc.yml +0 -0
  14. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/publish-pypi.yml +0 -0
  15. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/release.yml +0 -0
  16. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/tests-artifacts.yml +0 -0
  17. {xcomponent-0.6.6 → xcomponent-0.6.7}/.github/workflows/tests.yml +0 -0
  18. {xcomponent-0.6.6 → xcomponent-0.6.7}/.gitignore +0 -0
  19. {xcomponent-0.6.6 → xcomponent-0.6.7}/.python-version +0 -0
  20. {xcomponent-0.6.6 → xcomponent-0.6.7}/Justfile +0 -0
  21. {xcomponent-0.6.6 → xcomponent-0.6.7}/LICENSE +0 -0
  22. {xcomponent-0.6.6 → xcomponent-0.6.7}/docs/Makefile +0 -0
  23. {xcomponent-0.6.6 → xcomponent-0.6.7}/docs/source/conf.py +0 -0
  24. {xcomponent-0.6.6 → xcomponent-0.6.7}/docs/source/develop/.gitkeep +0 -0
  25. {xcomponent-0.6.6 → xcomponent-0.6.7}/docs/source/index.md +0 -0
  26. {xcomponent-0.6.6 → xcomponent-0.6.7}/docs/source/user/changelog.md +0 -0
  27. {xcomponent-0.6.6 → xcomponent-0.6.7}/scripts/get_version.py +0 -0
  28. {xcomponent-0.6.6 → xcomponent-0.6.7}/scripts/write_changelog.py +0 -0
  29. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/python/xcomponent/__init__.py +0 -0
  30. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/python/xcomponent/py.typed +0 -0
  31. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/python/xcomponent/service/__init__.py +0 -0
  32. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/python/xcomponent/service/catalog.py +0 -0
  33. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/python/xcomponent/xcore.pyi +0 -0
  34. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/catalog/catalog.rs +0 -0
  35. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/catalog/mod.rs +0 -0
  36. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/context.rs +0 -0
  37. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/ast/mod.rs +0 -0
  38. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/ast/model.rs +0 -0
  39. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/ast/parse.rs +0 -0
  40. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/grammar.pest +0 -0
  41. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/mod.rs +0 -0
  42. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/parser.rs +0 -0
  43. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/expression/tokens.rs +0 -0
  44. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/lib.rs +0 -0
  45. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/markup/grammar.pest +0 -0
  46. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/markup/mod.rs +0 -0
  47. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/markup/parser.rs +0 -0
  48. {xcomponent-0.6.6 → xcomponent-0.6.7}/src/rust/markup/tokens.rs +0 -0
  49. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/__init__.py +0 -0
  50. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/__init__.py +0 -0
  51. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/conftest.py +0 -0
  52. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_binary_op.py +0 -0
  53. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_binary_op_bool.py +0 -0
  54. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_default_values.py +0 -0
  55. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_field_access.py +0 -0
  56. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_for_expr.py +0 -0
  57. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_func.py +0 -0
  58. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_if_expr.py +0 -0
  59. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_let.py +0 -0
  60. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_nested.py +0 -0
  61. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_render_comment.py +0 -0
  62. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_script.py +0 -0
  63. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_str_method.py +0 -0
  64. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_types.py +0 -0
  65. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/expression/test_unary.py +0 -0
  66. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_core.py +0 -0
  67. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_named_component.py +0 -0
  68. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_attributes.py +0 -0
  69. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_context.py +0 -0
  70. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_globals.py +0 -0
  71. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_globals_obj.py +0 -0
  72. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_globals_obj2.py +0 -0
  73. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_nested_dict.py +0 -0
  74. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_nested_node.py +0 -0
  75. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_node.py +0 -0
  76. {xcomponent-0.6.6 → xcomponent-0.6.7}/tests/unittests/test_render_script.py +0 -0
@@ -1,3 +1,7 @@
1
+ ## 0.6.7 - 2025-09-20
2
+
3
+ * Fix behavior for None == None and None != None.
4
+
1
5
  ## 0.6.6 - 2025-09-12
2
6
 
3
7
  * Add support of None for == operator.
@@ -595,7 +595,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
595
595
 
596
596
  [[package]]
597
597
  name = "xcore"
598
- version = "0.6.6"
598
+ version = "0.6.7"
599
599
  dependencies = [
600
600
  "env_logger",
601
601
  "html-escape",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "xcore"
3
- version = "0.6.6"
3
+ version = "0.6.7"
4
4
  authors = ["Guillaume Gauvrit <guillaume@gauvr.it>"]
5
5
  edition = "2021"
6
6
  description = "JSX-like for python using maturin/pyo3 and pest."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xcomponent
3
- Version: 0.6.6
3
+ Version: 0.6.7
4
4
  Classifier: License :: OSI Approved :: MIT License
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.11
@@ -19,7 +19,7 @@ Requires-Dist: sphinx>=8.0.0,<9 ; extra == 'docs'
19
19
  Requires-Dist: sphinx-autodoc2>=0.5.0,<1 ; extra == 'docs'
20
20
  Provides-Extra: docs
21
21
  License-File: LICENSE
22
- Summary: A component base template engige - inspired by JSX
22
+ Summary: An embeded component base template engine - inspired by JSX
23
23
  Author-email: Guillaume Gauvrit <guillaume@gauvr.it>
24
24
  License: MIT
25
25
  Requires-Python: >=3.11
@@ -37,7 +37,7 @@ Project-URL: Changelog, https://mardiros.github.io/xcomponent/user/changelog.htm
37
37
  XComponent is a template engine, inspired by JSX, to embed template in Python.
38
38
 
39
39
  It diverge from all existing Python template engine since all the templates
40
- must be written in Python code.
40
+ must be written inside the Python code.
41
41
 
42
42
  This is a design decision and a matter of preference for the locality of behavior.
43
43
 
@@ -68,11 +68,11 @@ catalog.render("<HelloWorld name='Bob'/>")
68
68
  Using XComponent, templates are stored in a catalog of components, and then
69
69
  they can be rendered to HTML.
70
70
 
71
- All components can be reused in other component in order to build an HTML document
71
+ All components can be reused in other components in order to build an HTML document
72
72
  at the end.
73
73
 
74
74
  Using curly brace let's have a friendly expression language, inspired by Python,
75
- JSX and rust.
75
+ JSX and Rust.
76
76
 
77
77
  [Getting started ?](https://mardiros.github.io/xcomponent/)
78
78
 
@@ -5,7 +5,7 @@
5
5
  XComponent is a template engine, inspired by JSX, to embed template in Python.
6
6
 
7
7
  It diverge from all existing Python template engine since all the templates
8
- must be written in Python code.
8
+ must be written inside the Python code.
9
9
 
10
10
  This is a design decision and a matter of preference for the locality of behavior.
11
11
 
@@ -36,10 +36,10 @@ catalog.render("<HelloWorld name='Bob'/>")
36
36
  Using XComponent, templates are stored in a catalog of components, and then
37
37
  they can be rendered to HTML.
38
38
 
39
- All components can be reused in other component in order to build an HTML document
39
+ All components can be reused in other components in order to build an HTML document
40
40
  at the end.
41
41
 
42
42
  Using curly brace let's have a friendly expression language, inspired by Python,
43
- JSX and rust.
43
+ JSX and Rust.
44
44
 
45
45
  [Getting started ?](https://mardiros.github.io/xcomponent/)
@@ -236,6 +236,15 @@ A good alternative would be to use **a type with dataclasses or pydantic for the
236
236
  globals**, ensuring all declared fields have an appropriate default value and
237
237
  proper documentation.
238
238
 
239
+ ### Using scripts and style
240
+
241
+ HTML tags `<script>` and `<style>` have a special rendering in xcomponent;
242
+ **they can't contains any variable or expression**.
243
+ Says differently, it is not possible to generate a javascript function within
244
+ a XComponent expression. **The content of the `<script>` and `<style>` markup
245
+ tag is copied from the template at rendering, not interpreted**.
246
+
247
+
239
248
  ## XComponent Expression
240
249
 
241
250
  Everything in the Markup that has been enclosed by curly braces is an expression.
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "xcomponent"
3
- version = "0.6.6"
4
- description = "A component base template engige - inspired by JSX"
3
+ version = "0.6.7"
4
+ description = "An embeded component base template engine - inspired by JSX"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Guillaume Gauvrit", email = "guillaume@gauvr.it" }]
7
7
  license = { text = "MIT" }
@@ -123,6 +123,7 @@ fn eval_raw_eq(l: Literal, r: Literal, op: String) -> PyResult<bool> {
123
123
  (Literal::Bool(a), Literal::Int(b)) => Ok(a as isize == b),
124
124
  (Literal::Bool(a), Literal::Bool(b)) => Ok(a == b),
125
125
  (Literal::Str(a), Literal::Str(b)) => Ok(a == b),
126
+ (Literal::None(()), Literal::None(())) => Ok(true),
126
127
  (Literal::None(()), _) => Ok(false),
127
128
  (_, Literal::None(())) => Ok(false),
128
129
  (a, b) => Err(PyErr::new::<pyo3::exceptions::PyTypeError, _>(format!(
@@ -51,6 +51,7 @@ def Lte(a: int | bool | str, b: int | bool | str) -> str:
51
51
  pytest.param(Eq("1", "2"), "false", id="str-false"),
52
52
  pytest.param(Eq("1", "1"), "true", id="str-true"),
53
53
  pytest.param(Eq("", None), "false", id="str-None"),
54
+ pytest.param(Eq(None, None), "true", id="None-None"),
54
55
  ],
55
56
  )
56
57
  def test_eq(component: str, expected: str):
@@ -73,6 +74,7 @@ def test_eq(component: str, expected: str):
73
74
  pytest.param(Neq("1", "2"), "true", id="str-true"),
74
75
  pytest.param(Neq("1", "1"), "false", id="str-false"),
75
76
  pytest.param(Neq("1", None), "true", id="str-None"),
77
+ pytest.param(Neq(None, None), "false", id="None-None"),
76
78
  ],
77
79
  )
78
80
  def test_neq(component: str, expected: str):
@@ -598,7 +598,7 @@ wheels = [
598
598
 
599
599
  [[package]]
600
600
  name = "xcomponent"
601
- version = "0.6.6"
601
+ version = "0.6.7"
602
602
  source = { editable = "." }
603
603
 
604
604
  [package.optional-dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes