|
15 | 15 | # <br><b>Changelog</b><br> |
16 | 16 |
|
17 | 17 |
|
| 18 | +<span id="v1-9-3" /> |
| 19 | + |
| 20 | +## 01.01.2026 `v1.9.3` Big Update 🚀 |
| 21 | + |
| 22 | +**𝓗𝓪𝓹𝓹𝔂 𝟚𝟘𝟚𝟞 🎉** |
| 23 | + |
| 24 | +* Added a new method `Color.str_to_hsla()` to parse HSLA colors from strings. |
| 25 | +* Changed the default syntax highlighting for `Data.to_str()` and therefore also `Data.print()` to use console default colors. |
| 26 | +* Added the missing but needed dunder methods to the `Args` and `ArgResult` classes and the `rgba`, `hsla` and `hexa` color objects for better usability and type checking. |
| 27 | +* Added three new methods to `Args`: |
| 28 | + - `get()` returns the argument result for a given alias, or a default value if not found |
| 29 | + - `existing()` yields only the existing arguments as tuples of `(alias, ArgResult)` |
| 30 | + - `missing()` yields only the missing arguments as tuples of `(alias, ArgResult)` |
| 31 | +* Added a new attribute `is_positional` to `ArgResult`, which indicates whether the argument is a positional argument or not. |
| 32 | +* The `ArgResult` class now also has a `dict()` method, which returns the argument result as a dictionary. |
| 33 | +* Added new properties `is_tty` and `supports_color` to the `Console` class, `home` to the `Path` class and `is_win` to the `System` class. |
| 34 | +* Added the option to add format specifiers to the `{current}`, `{total}` and `{percentage}` placeholders in the `bar_format` and `limited_bar_format` of `ProgressBar`. |
| 35 | +* Finally fixed the `C901 'Console.get_args' is too complex (39)` linting error by refactoring the method into its own helper class. |
| 36 | +* Changed the string- and repr-representations of the `rgba` and `hsla` color objects and newly implemented it for the `Args` and `ArgResult` classes. |
| 37 | +* Made internal, global constants, which's values never change, into `Final` constants for better type checking. |
| 38 | +* The names of all internal classes and methods are all no longer prefixed with a double underscore (`__`), but a single underscore (`_`) instead. |
| 39 | +* Changed all methods defined as `@staticmethod` to `@classmethod` where applicable, to improve inheritance capabilities. |
| 40 | +* Adjusted the whole library's type hints to be way more strict and accurate, using `mypy` as static type checker. |
| 41 | +* Change the class-property definitions to be defined via `metaclass` and using `@property` decorators, to make them compatible with `mypyc`. |
| 42 | +* Unnest all the nested methods in the whole library for compatibility with `mypyc`. |
| 43 | +* The library is now compiled using `mypyc` when installing, which makes it run significantly faster. Benchmarking results: |
| 44 | + - Simple methods like data and color operations had a speed improvement of around 50%. |
| 45 | + - Complex methods like console logging had a speed improvement of up to 230%! |
| 46 | + |
| 47 | +**BREAKING CHANGES:** |
| 48 | +* Renamed `Data.to_str()` to `Data.render()`, since that describes its functionality better (*especially with the syntax highlighting option*). |
| 49 | +* Renamed the constant `ANSI.ESCAPED_CHAR` to `ANSI.CHAR_ESCAPED` for better consistency with the other constant names. |
| 50 | +* Removed the general `Pattern` and `Match` type aliases from the `base.types` module (*they are pointless since you should always use a specific type and not "type1 OR typeB"*). |
| 51 | +* Removed the `_` prefix from the param `_syntax_highlighting` in `Data.render()`, since it's no longer just for internal use. |
| 52 | + |
| 53 | + |
18 | 54 | <span id="v1-9-2" /> |
19 | 55 |
|
20 | 56 | ## 16.12.2025 `v1.9.2` |
| 57 | + |
21 | 58 | * Added a new class `LazyRegex` to the `regex` module, which is used to define regex patterns that are only compiled when they are used for the first time. |
22 | 59 | * Removed unnecessary character escaping in the precompiled regex patterns in the `console` module. |
23 | 60 | * Removed all the runtime type-checks that can also be checked using static type-checking tools, since you're supposed to use type checkers in modern python anyway, and to improve performance. |
|
40 | 77 | <span id="v1-9-1" /> |
41 | 78 |
|
42 | 79 | ## 26.11.2025 `v1.9.1` |
| 80 | + |
43 | 81 | * Unified the module and class docstring styles throughout the whole library. |
44 | 82 | * Moved the Protocol `ProgressUpdater` from the `console` module to the `types` module. |
45 | 83 | * Added throttling to the `ProgressBar` update methods to impact the actual process' performance as little as possible. |
|
55 | 93 | <span id="v1-9-0" /> |
56 | 94 |
|
57 | 95 | ## 21.11.2025 `v1.9.0` Big Update 🚀 |
| 96 | + |
58 | 97 | * Standardized the docstrings for all public methods in the whole library to use the same style and structure. |
59 | 98 | * Replaced left over single quotes with double quotes for consistency. |
60 | 99 | * Fixed a bug inside `Data.remove_empty_items()`, where types other than strings where passed to `String.is_empty()`, which caused an exception. |
|
90 | 129 |
|
91 | 130 | <span id="v1-8-4" /> |
92 | 131 |
|
93 | | -## 11.11.2025 `v1.8.4` 𝓢𝓲𝓷𝓰𝓵𝓮𝓼 𝓓𝓪𝔂 🥇😉 |
| 132 | +## 11.11.2025 `v1.8.4` |
| 133 | + |
| 134 | +**𝓢𝓲𝓷𝓰𝓵𝓮𝓼 𝓓𝓪𝔂 🥇😉** |
94 | 135 |
|
95 | 136 | * Adjusted `Regex.hsla_str()` to not include optional degree (`°`) and percent (`%`) symbols in the captured groups. |
96 | 137 | * Fixed that `Regex.hexa_str()` couldn't match HEXA colors anywhere inside a string, but only if the whole string was just the HEXA color. |
|
158 | 199 |
|
159 | 200 | <span id="v1-8-0" /> |
160 | 201 |
|
161 | | -## 28.08.2025 `v1.8.0` **⚠️This release is broken!** |
| 202 | +## 28.08.2025 `v1.8.0` **⚠️ This release is broken!** |
162 | 203 |
|
163 | 204 | * New options for the param `find_args` from the method `Console.get_args()`:<br> |
164 | 205 | Previously you could only input a dictionary with items like `"alias_name": ["-f", "--flag"]` that specify an arg's alias and the flags that correspond to it.<br> |
|
194 | 235 | ## 17.06.2025 `v1.7.2` |
195 | 236 |
|
196 | 237 | * The `Console.w`, `Console.h` and `Console.wh` class properties now return a default size if there is no console, instead of throwing an error. |
197 | | -* It wasn't actually possible to use default console-colors (*e.g.* `"red"`, `"green"`, ...) for the color params in `Console.log()` so that option was completely removed again. |
| 238 | +* It wasn't actually possible to use default console-colors (*e.g.* `"red"`, `"green"`, …) for the color params in `Console.log()` so that option was completely removed again. |
198 | 239 | * Upgraded the speed of `FormatCodes.to_ansi()` by adding the internal ability to skip the `default_color` validation. |
199 | 240 | * Fixed type hints for the whole library. |
200 | 241 | * Fixed a small bug in `Console.pause_exit()`, where the key, pressed to unpause wasn't suppressed, so it was written into the next console input after unpausing. |
|
208 | 249 | * Added a new method `Console.log_box_bordered()`, which does the same as `Console.log_box_filled()`, but with a border instead of a background color. |
209 | 250 | * The module `xx_format_codes` now treats the `[*]` to-default-color-reset as a normal full-reset, when no `default_color` is set, instead of just counting it as an invalid format code. |
210 | 251 | * Fixed bug where entering a color as HEX integer in the color params of the methods `Console.log()`, `Console.log_box_filled()` and `Console.log_box_bordered()` would not work, because it was not properly converted to a format code. |
211 | | -* You can now use default console colors (*e.g.* `"red"`, `"green"`, ...) for the color params in `Console.log()`. |
| 252 | +* You can now use default console colors (*e.g.* `"red"`, `"green"`, …) for the color params in `Console.log()`. |
212 | 253 | * The methods `Console.log_box_filled()` and `Console.log_box_bordered()` no longer right-strip spaces, so you can make multiple log boxes the same width, by adding spaces to the end of the text. |
213 | 254 |
|
214 | 255 | **BREAKING CHANGES:** |
|
332 | 373 |
|
333 | 374 | <span id="v1-6-3" /> |
334 | 375 |
|
335 | | -## 22.01.2025 `v1.6.3` **⚠️This release is broken!** |
| 376 | +## 22.01.2025 `v1.6.3` **⚠️ This release is broken!** |
336 | 377 |
|
337 | 378 | * Fixed a small bug in `xx_format_codes`:<br> |
338 | 379 | Inside print-strings, if there was a `'` or `"` inside an auto-reset-formatting (*e.g.* `[u](there's a quote)`), that caused it to not be recognized as valid, and therefore not be automatically reset.<br> |
|
440 | 481 |
|
441 | 482 | ## 11.11.2024 `v1.5.6` |
442 | 483 |
|
| 484 | +**Again 𝓢𝓲𝓷𝓰𝓵𝓮𝓼 𝓓𝓪𝔂 🥇😉** |
| 485 | + |
443 | 486 | * Moved the whole library to its own repository: **[PythonLibraryXulbuX](https://github.com/XulbuX/PythonLibraryXulbuX)** |
444 | 487 | * Updated all connections and links correspondingly. |
445 | 488 |
|
|
448 | 491 |
|
449 | 492 | ## 11.11.2024 `v1.5.5` |
450 | 493 |
|
| 494 | +**𝓢𝓲𝓷𝓰𝓵𝓮𝓼 𝓓𝓪𝔂 🥇😉** |
| 495 | + |
451 | 496 | * Added methods to get the width and height of the console (*in characters and lines*):<br> |
452 | 497 | - <code>Cmd.w() -> *int*</code> how many text characters the console is wide<br> |
453 | 498 | - <code>Cmd.h() -> *int*</code> how many lines the console is high<br> |
@@ -774,7 +819,7 @@ from XulbuX import rgb, hsl, hexa |
774 | 819 | <thead> |
775 | 820 | <tr> |
776 | 821 | <th>Features</th> |
777 | | - <th>class, type, function, ...</th> |
| 822 | + <th>class, type, function, …</th> |
778 | 823 | </tr> |
779 | 824 | </thead> |
780 | 825 | <tbody> |
|
0 commit comments