Skip to content

v1.4.0 (BREAKING CHANGES) - Added `inject_items`, tests overhaul, bug fixes and cleanup

Choose a tag to compare

@Someguy123 Someguy123 released this 19 Oct 06:17
· 71 commits to master since this release

Notable Changes

New Features

  • Added common.inject_items - a small function for injecting a list into another list
    at an arbitrary position.

General Improvements/Fixes

  • Fixed net.asn_to_name so that it correctly raises KeyError or returns
    'Unknown ASN' when dnspython raises NoAnswer
  • Added plugin.HAS_DNSPYTHON attribute, for checking whether the dnspython dependent
    functions/classes were loaded or not
  • (POTENTIALLY BREAKING CHANGE) __init__.py no longer loads the django module,
    as it was causing endless issues related to Django not being configured, or
    not being ready for accessing certain modules.

The change to __init__.py loading Django means importing privex.helpers.django functions/classes via from privex.helpers import xxx will no longer work.

Any application which imported django functions/classes via privex.helpers must now use absolute imports, e.g.

from privex.helpers.django import is_database_synchronized

Documentation

  • Fixed small typo in cache.RedisCache pydoc block
  • Re-organised Unit Tests section to make it more readable
  • Re-named the cache module into "Cache Abstraction Layer", as the module page contains
    a lot of hand written documentation about it.
  • Re-organised the code documentation to be top level
  • Added Usage Examples section
  • Fleshed out the index page of the docs

Unit Test updates

  • Extracted tests from tests.py into individual files in tests folder, as tests.py
    was close to 500 lines long and growing...
  • Added unit tests for net.asn_to_name
  • Added unit tests for common.inject_items