Smartini

Latest version: v1.1.2

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.1.2

🛠️ Bugfixes

- Fix slot creation

💭 Notes

This release can also be downloaded on [PyPi](https://pypi.org/project/smartini/1.1.2/).

1.1.1

🎉 New features

- Added `DEFAULT_STRING_CONVERTER` which saves the value as is (so far this was done via some confusing `None` assignments to `type_converter`) (607fef7b6f67c7db6b07c483ac9d861b76501a61)

🚨 Breaking changes

- SmartIni now warns you instead of raising an exception when there is an inconsistency inside your INI file (607fef7b6f67c7db6b07c483ac9d861b76501a61)
- The entity delimiter can no longer be changed and is defined as the INI standard, that is newline (`\n`) (578a1959435ec4a2c0074fbfe589d0043c4661be)
- Markers (option delimiter, comment prefix, multiline prefix) are now restrained to certain characters (6facbcc4cdd70cf559c113c2d024b7fdb93ff150)
- `type_converter` argument for `Parameters` is now called `default_type_converter` (607fef7b6f67c7db6b07c483ac9d861b76501a61)
- `set_structure()` of `_StructureSlotEntity` (like Schema and Section) now raises a `ValueError` instead of an `IniStructureError` when not all items inside the new structure are part of the entity (cb6cb842a2a42cdf7283cbd45d8e5c8f497c92f0)
- `Section.get_comment_by_content` is now called `Section.get_comments_by_content` (6bc5000e87d81ca3632f9e67f5dcf69a057d9a3d)

🛠️ Bugfixes

- Type converters are now correctly applied for undefined options (6815b72e5878ea3c58496667021ab62b9998fd80)
- Numeric type converter now correctly handles whitespace in numeric strings (e.g. `1 + 5j`) (c205d5087f01594cc8994ae79439ed9ad8d5b52b)
- Type converters are now correctly applied to continuations (607fef7b6f67c7db6b07c483ac9d861b76501a61)
- The unnamed section is now correctly removed when empty after reading (eecfd32178cbf363eb1581ac64de57625214501e)

⚙️ Internal changes

- Use modern `TypeVar` declarations (9d449c02044273ce6ce302dfa243e637d6b7b723)
- Restructure `_ReadIni` (607fef7b6f67c7db6b07c483ac9d861b76501a61)
- Remove legacy `apply_to_slots` (9da4acbb1018b17fe88159a36acee6a227b21a71)
- Add unit tests (987f35cca93736e9e18a34eda2cf54c1f1629656)

💭 Notes

This release can also be downloaded on [PyPi](https://pypi.org/project/smartini/1.1.1/).

1.1.0

🚨 Breaking changes

🎉 Introducing: Type hinting and type conversion

Option values are now automatically converted and returned respectively if not set differently. For more information, [see the docs](https://github.com/t1h0/smartini?tab=readme-ov-file#type-hinting-and-type-conversion).

💭 Notes

This release can also be downloaded on [PyPi](https://pypi.org/project/smartini/1.1.0/).

1.0.1

Backwards incompatible changes

- Section name identifier ([) is not allowed to be a comment prefix or option delimiter anymore (b06bcae64f7a9f1fe347b2ec0513ba1332d1ed19, dd97d31d74c542f709aa35de26d8affbfb228b44)

Improvements

- Initialize sections on schema init (thus no more SectionMeta output for get_section etc.; 570c90863b6a5b3d5e2d0550f709aa0a322e6534)

Bugfixes

- Fix automatic SlotAccess not working for methods (8064647cb933e3ccf53cd6401e2149091cc8551a)
- Fix comments resulting in options if they include an option delimiter (0488acd50162f08e3620d6dde9532c5cb233a36a)
- Update documentation (README and docstrings; 9dda94975039ee90a9f070c3a6e0f212b1011702, e46e9781ee4a76a939c044e4cd1152a4cc5e5aa6)
- Fix package installation (move source files to src/smartini, put init in right place and add MANIFEST.in; 15a829ff6f3108741fd79884809985832de3ee1e, e4358f7367a3041af989cef623f3d1f81cd8f9dd, 1384664ec655c82f68a830bb1d0af649c80165b0)

Internal changes

- Make classes private that should not be accessed by user (94838fba4f8db2dd9bcb4f556f883a2ee9051fbe)
- Move read_ini to own class (68472112cefebdf04bc6eb0616ae2cfc59fb9f1d)
- Move argument validation for Parameters into respective setters (dd97d31d74c542f709aa35de26d8affbfb228b44)
- Create type aliases for comment prefix and option delimiter (959b7d5b5cb3c5a4c79974d964f33b79d5aaf52a)
- Move utils from nomopytools to utils (e89c9deb030f4c65e3f85097ff98e9d14c3670fb)

This release can also be downloaded on [PyPi](https://pypi.org/project/smartini/1.0.1/).

1.0

First public release of SmartIni.

This release can also be downloaded on [PyPi](https://pypi.org/project/smartini/1.0/).

**Full Changelog**: https://github.com/t1h0/smartini/commits/v1.0

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.