Configparserenhanced

Latest version: v0.8.1.5

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

Scan your dependencies

Page 2 of 4

0.8.0

Added
- OSS License approval
- Using 3-Clause BSD license.
- Added LICENSE.md
- Added License headers to source files.
- Github Actions Script (initial testing)
Changed
- Added some docstring updates.
- Changed the _require set before use_ restriction on `parse_section_last_result`
that uses `TypedProperty` since this seemed to trigger an error in the insection
part of `get_known_operations()`. I'm not sure why inspection would do that at this
time and it'll need a bit of investigation. Probably we need to implement a proper
`getter` in TypedProperty and apply those checks there.
Deprecated
Removed
Fixed
- Added the list of file(s) that are loaded to the error message in the validator
functions: `assert_file_all_sections_handled`, `assert_section_all_options_handled`
- Fixed a bug in the list comprehension in `get_known_operations()` and added a test
to make sure it's doing the right thing.
Internal
Security

0.7.0

Added
- `get_known_operations()`
- Generate a list of _known_ operations based on defined _handlers_.
- `get_known_operations_message()`
- Generate a message listing _known_ operations generated by `get_known_operations()`.
- `assert_section_all_options_handled()`
- Enable a check that there are no unhandled options within a specific section of a .ini file.
- `assert_file_all_sections_handled()`
- Enable a check that there are no unhandled options in any section of a .ini file
- `_tokenize_option_key()`
- A parser helper used for processng _options_ into possible _operations_
- `_get_op_components_from_tokenized_option_key()`
- A parser helper used for processng _options_ into possible _operations_
Changed
Deprecated
Removed
Fixed
Internal
- Updated `.style.yapf` and `exec-reformat.sh` and ran a pass through the code to do a formatting
pass.
- Added Python 3.6.x check to `ConfigParserEnhanced.py`
- Changed many strings to use *f-strings* instead of `.format()` (requires Python 3.6)
Security

0.6.0

Added
- property: `default_section_name` - parameterizes the CPE's version of the "DEFAULT" section.
This defaults to "DEFAULT" and will get loaded in _once_ at the start a new parse of a section.
Changed
- Relocated the `configparserenhanced` directory into `src/configparserenhanced` and adjusted
documentation, testing, etc. files to work with this new structure.
- The logic for `TypedProperty` validator functions is reversed. Falsy results mean failure now
and truthy results indicate a successful validation of a value.
Deprecated
Removed
Fixed
Internal
- Performed a style refactoring pass.
- Added a `.style.yapf` file with a reasonable looking set of specifications.
- removed _testing_ requirements from the `requirements.txt` file and put them in
a new file, `requirements-test.txt`.
- cleaned up output from the `exec-tests.sh` file to now put log info in files named `_test-XXX.log`
- property: `_internal_default_section_name` - parameterizes the internal ConfigParser object's
_DEFAULT_ section to a _nonstandard_ value (`CONFIGPARSERENHANCED_COMMON`).
This section name should generally be avoided in .ini files as it can cause undefined behavior
in CPE's recursive search when there are `use` operations present. This is because ConfigParser's
DEFAULT section will be prepended to _each_ section processed. This will invalidate any changes
made in a CPE section to a value set in the default.
Security

0.5.2

Added
Changed
Deprecated
Removed
Fixed
Internal
- Added a `default_factory` to the `TypedProperty` utility for when the default value
is too complex to use `deepcopy` and we need to use some kind of generator.
Security

0.5.0

Added
- `operation_handler` decorator
- Enables the creation of handlers using decorators. For example:
python
operation_handler
def handler_myop(self, section_name, handler_parameters):
do stuff
return 0

- `__repr__()` added to `ConfigParserEnhanced.ConfigParserEnhancedData`
- `TypedProperty` : implements a `dataclass` pattern that allows the generation of "typed" properties
generally following and extending the pattern outlined in "9.21 Avoiding Repetitive Property Methods"
from the O'Reilly "Python Cookbook, 3rd Edition" (https://learning.oreilly.com/library/view/python-cookbook-3rd/9781449357337/)
Changed
- HandlerParameters is modified to use `TypedProperty.typed_property` pattern to define
properties.
Deprecated
Removed
Fixed
Internal
Security
-->

0.4.1

Added
- Method: Add new method, `write()`.
This is a wrapper to `unroll_to_str()` which writes the output to a
file pointer. We included this function to provide a familiar interface
to `ConfigParserEnhanced` as the `ConfigParser.write()` method.
- Method: Add new method, `unroll_to_str()`.
This generates a `str` containing a _parsed_ copy of the `.ini` file in
which all _handled_ options are stripped out leaving the regular _key:value_
pairs remaining. The effect of this is to generate a string containing
the transitive-closure of each section's options after all the `use`
operations have been processed.
- ExceptionControl: Added new event _type_ `SILENT`, which will throw its exception
at the same level of a `WARNING` but will never print a warning message to stdout.
- ConfigParserEnhanced property: `configparser_delimiters` which exposes the ability to
modify the delimiters in the underlying `ConfigParser` parser for .ini files. Default
value is `('=',':')` and it allows assignment as a list, tuple, or str but gets converted
to a tuple internally.
- Internal helper method `_locate_class_method(method_name)` which finds a class method
if it is defined.
Changed
Deprecated
Removed
Fixed
Internal
Security

Page 2 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.