#50226 Ticket 50224 - warnings on deprecated API usage
Closed by spichugi. Opened by firstyear.
firstyear/389-ds-base 50224-warning-disincentive  into  master

Download 50226.patch

Bug Description: There have been many cases of incorrect and
invalid api usage. As we go on, we can't allow more usage of
these apis to be added as it only puts more work on us in
the future to remove.

Fix Description: Add deprecation warnings to these apis, telling
people they will be removed, and where their faulty code is.

https://pagure.io/389-ds-base/issue/50224

Author: William Brown william@blackhats.net.au

An example of this warning:

    warnings.warn(DeprecationWarning("Use of raw ldap function %s. This will removed in a future release. Found in: %s:%s" % (name, frame.filename, frame.lineno)))
  /usr/lib/python3.7/site-packages/lib389-1.4.0.1-py3.7.egg/lib389/__init__.py:156: DeprecationWarning: Use of raw ldap function rename_s. This will removed in a future release. Found in: /home/william/development/389ds/ds/dirsrvtests/tests/suites/basic/basic_test.py:191

Additionally, this change demonstrates an example of the kind of error it can detect and pick up - use of the old, invalid importLDIF in basic tests.

rebased onto d1c917d32da79507a6097ab6a2df1a3960e4f119

Updated to only display dragon on "non-debug", and rename raw_entry to _unsafe_raw_entry to promote it shouldn't be used.

LGTM!

rebased onto 2031ed0d72680354d3363d9cf115ebf6f40a9b65

Pull-Request has been merged by firstyear

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3285

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata