- Update dependencies
- Update typing idioms to Python >= 3.9.
- Update dependencies
- This removes support for Python < 3.9.
- Update for Python 3.10.
- Fix documentation generation -> https://ldif.readthedocs.io/.
- Add type annotations.
- Take over the maintenance of this package as we need if for our customers (see: https://github.com/abilian/labandco ).
- Drop Python 2 support.
- Fix detection of unsafe strings in
unparse
(See #7)
- Ignore non-unicode characters in "dn" in non-strict mode. (Fixes #5)
Overhaule the unicode support to also support binary data (e.g. images) encoded in LDIF.
You can now pass an encoding to the parser which will be used to decode values. If decoding failes, a bytestring will be returned. If you pass an encoding of
None
, the parser will not try to do any conversion and return bytes directly.This change should be completely backwards compatible, as the parser now gracefully handles a case where it crashed previously.
(See #4)
- Allow empty values for attributes.
This is mostly a reaction to python-ldap 2.4.20.
Restore support for
records_read
as well as addingline_counter
andbyte_counter
that were introduced in python-ldap 2.4.20.Stricter order checking of
dn:
.Remove partial support for parsing change records. A more complete implementation based on improvements made in python-ldap may be included later. But for now, I don't have the time.
Breaking change:
LDIFParser.parse()
now yieldsdn, entry
rather thandn, changetype, entry
.
- Include documentation source and changelog in source distribution. (Thanks to Michael Fladischer)
- Add LICENSE file
- Use OrderedDict for entries.
This is the first version of a fork of the ldif
module from python-ldap. For any changes before that, see the
documentation over there. The last version before the fork was 2.4.15.
The changes introduced with this version are:
- Dropped support for python < 2.7.
- Added support for python 3, including unicode support.
- All deprecated functions (
CreateLDIF
,ParseLDIF
) were removed. LDIFCopy
andLDIFRecordList
were removed.LDIFParser.handle()
was removed. Instead,LDIFParser.parse()
yields the records.LDIFParser
has now astrict
option that defaults toTrue
for backwards-compatibility. If set toFalse
, recoverable parse errors will produce log warnings rather than exceptions.