css-inline 0.14.6__tar.gz → 0.16.0__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 (35) hide show
  1. {css_inline-0.14.6 → css_inline-0.16.0}/PKG-INFO +10 -11
  2. {css_inline-0.14.6 → css_inline-0.16.0}/bindings/python/CHANGELOG.md +39 -1
  3. {css_inline-0.14.6 → css_inline-0.16.0}/bindings/python/Cargo.lock +505 -427
  4. {css_inline-0.14.6 → css_inline-0.16.0}/bindings/python/Cargo.toml +5 -5
  5. {css_inline-0.14.6 → css_inline-0.16.0}/bindings/python/README.md +7 -7
  6. {css_inline-0.14.6 → css_inline-0.16.0}/bindings/python/src/lib.rs +2 -2
  7. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/Cargo.toml +10 -10
  8. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/README.md +9 -9
  9. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/attributes.rs +4 -15
  10. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/document.rs +4 -10
  11. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/element.rs +14 -9
  12. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/iter.rs +8 -7
  13. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/parser.rs +67 -55
  14. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/local_name.rs +7 -0
  15. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/mod.rs +1 -1
  16. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/serializer.rs +15 -13
  17. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/lib.rs +7 -5
  18. css_inline-0.16.0/css-inline/src/main.rs +396 -0
  19. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/parser.rs +4 -1
  20. {css_inline-0.14.6 → css_inline-0.16.0}/pyproject.toml +6 -4
  21. css_inline-0.14.6/css-inline/src/main.rs +0 -209
  22. {css_inline-0.14.6 → css_inline-0.16.0}/LICENSE +0 -0
  23. {css_inline-0.14.6 → css_inline-0.16.0}/bindings/python/build.rs +0 -0
  24. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/benches/inliner.rs +0 -0
  25. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/rustfmt.toml +0 -0
  26. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/error.rs +0 -0
  27. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/hasher.rs +0 -0
  28. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/mod.rs +0 -0
  29. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/node.rs +0 -0
  30. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/attr_value.rs +0 -0
  31. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/parser.rs +0 -0
  32. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/pseudo_classes.rs +0 -0
  33. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/pseudo_elements.rs +0 -0
  34. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/html/selectors/selector_impl.rs +0 -0
  35. {css_inline-0.14.6 → css_inline-0.16.0}/css-inline/src/resolver.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: css-inline
3
- Version: 0.14.6
3
+ Version: 0.16.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -8,12 +8,11 @@ Classifier: Operating System :: MacOS :: MacOS X
8
8
  Classifier: Operating System :: Microsoft :: Windows
9
9
  Classifier: Operating System :: POSIX
10
10
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.7
12
- Classifier: Programming Language :: Python :: 3.8
13
11
  Classifier: Programming Language :: Python :: 3.9
14
12
  Classifier: Programming Language :: Python :: 3.10
15
13
  Classifier: Programming Language :: Python :: 3.11
16
14
  Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
17
16
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
17
  Classifier: Programming Language :: Python :: Implementation :: PyPy
19
18
  Classifier: Programming Language :: Rust
@@ -22,7 +21,7 @@ Summary: High-performance library for inlining CSS into HTML 'style' attributes
22
21
  Keywords: css,html,email,stylesheet,inlining
23
22
  Author: Dmitry Dygalo <dmitry@dygalo.dev>
24
23
  Author-email: Dmitry Dygalo <dmitry@dygalo.dev>
25
- Requires-Python: >=3.7
24
+ Requires-Python: >=3.9
26
25
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
27
26
  Project-URL: homepage, https://github.com/Stranger6667/css-inline/tree/master/bindings/python
28
27
  Project-URL: repository, https://github.com/Stranger6667/css-inline
@@ -73,7 +72,7 @@ into:
73
72
  - Can process multiple documents in parallel
74
73
  - Works on Linux, Windows, macOS and in the browser via PyOdide
75
74
  - Supports HTML5 & CSS3
76
- - Tested on CPython 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and PyPy 3.7, 3.8, 3.9, 3.10.
75
+ - Tested on CPython 3.9, 3.10, 3.11, 3.12, 3.13 and PyPy 3.9, 3.10.
77
76
 
78
77
  ## Playground
79
78
 
@@ -266,17 +265,17 @@ Most of the time it achieves over a **10x** speed advantage compared to the next
266
265
 
267
266
  Here is the performance comparison:
268
267
 
269
- | | Size | `css_inline 0.14.1` | `premailer 3.10.0` | `toronado 0.1.0` | `inlinestyler 0.2.5` | `pynliner 0.8.0` |
268
+ | | Size | `css_inline 0.16.0` | `premailer 3.10.0` | `toronado 0.1.0` | `inlinestyler 0.2.5` | `pynliner 0.8.0` |
270
269
  |-------------|---------|---------------------|------------------------|-------------------------|------------------------|------------------------|
271
- | Basic | 230 B | 6.54 µs | 127.62 µs (**19.51x**) | 657.50 µs (**100.52x**) | 1.02 ms (**157.01x**) | 1.17ms (**179.64x**) |
272
- | Realistic-1 | 8.58 KB | 134.54 µs | 1.40 ms (**10.42x**) | 15.81 ms (**117.54x**) | 26.37 ms (**196.04x**) | 52.77 ms (**392.29x**) |
273
- | Realistic-2 | 4.3 KB | 82.37 µs | 2.78 ms (**33.80x**) | ERROR | 17.71 ms (**215.01x**) | ERROR |
274
- | GitHub page | 1.81 MB | 223.85 ms | 25.04 s (**111.90x**) | ERROR | ERROR | ERROR |
270
+ | Basic | 230 B | 4.31 µs | 106.94 µs (**24.77x**) | 602.44 µs (**139.52x**) | 1.02 ms (**236.65x**) | 1.13ms (**263.43x**) |
271
+ | Realistic-1 | 8.58 KB | 83.37 µs | 1.20 ms (**14.42x**) | 13.66 ms (**163.85x**) | 26.37 ms (**316.30x**) | 44.76 ms (**536.88x**) |
272
+ | Realistic-2 | 4.3 KB | 57.60 µs | 1.73 ms (**30.04x**) | ERROR | 17.71 ms (**307.46x**) | ERROR |
273
+ | GitHub page | 1.81 MB | 139.57 ms | 13.94 s (**99.90x**) | ERROR | ERROR | ERROR |
275
274
 
276
275
  The "Basic" case was obtained by benchmarking the example from the Usage section.
277
276
  Note that the `toronado`, `inlinestyler`, and `pynliner` libraries both encountered errors when used to inline CSS in the last scenario.
278
277
 
279
- The benchmarking code is available in the `benches/bench.py` file. The benchmarks were conducted using the stable `rustc 1.78`, Python `3.11.7` on M1 Max.
278
+ The benchmarking code is available in the `benches/bench.py` file. The benchmarks were conducted using the stable `rustc 1.87`, Python `3.12.5` on Ryzen 9 9950X.
280
279
 
281
280
  ## Comparison with other libraries
282
281
 
@@ -2,6 +2,42 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.16.0] - 2025-07-16
6
+
7
+ ### Changed
8
+
9
+ - Bump MSRV to `1.75`.
10
+ - Update `selectors` to `0.30`.
11
+ - Update `html5ever` to `0.35`.
12
+
13
+ ### Fixed
14
+
15
+ - Set `3.9` in `requires-python` key in `pyproject.toml`.
16
+ - Ignored `!important` that has insignificant whitespace after it.
17
+
18
+ ### Performance
19
+
20
+ - Use interned string to compare `style` element name.
21
+ - Only check the value suffix for `!important`.
22
+
23
+ ## [0.15.0] - 2025-06-17
24
+
25
+ ### Changed
26
+
27
+ - Update `PyO3` to `0.25.0`.
28
+ - Update `cssparser` to `0.35`.
29
+ - Update `html5ever` to `0.31`.
30
+ - Update `selectors` to `0.28`.
31
+
32
+ ### Performance
33
+
34
+ - Slightly improve performance of HTML serialization.
35
+ - Avoid creating unused caches.
36
+
37
+ ### Removed
38
+
39
+ - Support for Python <3.9.
40
+
5
41
  ## [0.14.6] - 2024-12-27
6
42
 
7
43
  ### Fixed
@@ -446,7 +482,9 @@
446
482
 
447
483
  - Initial public release
448
484
 
449
- [Unreleased]: https://github.com/Stranger6667/css-inline/compare/python-v0.14.6...HEAD
485
+ [Unreleased]: https://github.com/Stranger6667/css-inline/compare/python-v0.16.0...HEAD
486
+ [0.16.0]: https://github.com/Stranger6667/css-inline/compare/python-v0.15.0...python-v0.16.0
487
+ [0.15.0]: https://github.com/Stranger6667/css-inline/compare/python-v0.14.6...python-v0.15.0
450
488
  [0.14.6]: https://github.com/Stranger6667/css-inline/compare/python-v0.14.5...python-v0.14.6
451
489
  [0.14.5]: https://github.com/Stranger6667/css-inline/compare/python-v0.14.4...python-v0.14.5
452
490
  [0.14.4]: https://github.com/Stranger6667/css-inline/compare/python-v0.14.3...python-v0.14.4