Releases: SuadeLabs/rattr
Releases · SuadeLabs/rattr
v0.2.4
v0.2.3
- Include the rattr version in the cache info
Full Changelog: v0.2.2...v0.2.3
v0.2.2
v0.2.1
v0.2.0
Minor bug fixes:
- Fix error to resolve relative import in the current directory when there is no
__init__.py
file. - Fix error on trying to read an empty file.
- Fix error where the import clobbering check failed on method names matching imported name (false positive).
- Fix error where rattr did not inspect the
elt
andgenerators
of aGeneratorExpr
.
Refactor:
- Move to
attrs
for internal data structures. This will allow for quicker serialisation and deserialisation viacattrs
later if we wish.
Performance:
- Use a custom solution for resolving the source code file of an import, rather than using
importlib.util.find_spec
. This is because the latter is slow due to an (intended) side-effect in which the parent module is imported and thus module-level code is executed. - Rework the plug-ins system to avoid
O(n^2)
code being repeated on each function analysed. - Rework results simplification completely. Recursion (costly in Python) has been avoided and the tree is walked post-order.
- Shallow copy (not deep copy) target IR on creating a new
IrTarget
as we do not tamper with the value and this is much faster
v0.1.8
Support namedtuples in strict mode
Allow named tuples in strict mode (#48) * test: add named tuple regression tests * feat: allow named tuple from class * feat: namedtuple util functions * feat: support namedtuple from call in global scope * style: add no return type hint to fatal(...) * feat: visit locally defined named tuple this is mostly unsupported for now, though I have some idea of how to improve context s.t. we can have locally scoped functions etc * test: make the namedtuple tests more granular * style: fix linting * refactor: better get_namedtuple_attrs_from_call * ci: do not test against Python 3.7 Python 3.7 is deprecated in a future feature branch and this requires work with AST constants which change between 3.7 and 3.8; thus we skip Python 3.7 support for this release and fully-deprecate in a future release. * ci: test on pypy-3.9 Co-authored-by: Oliver Margetts <[email protected]> * style(review): fix erroneous comment Co-authored-by: Oliver Margetts <[email protected]> --------- Co-authored-by: brandon <[email protected]> Co-authored-by: Oliver Margetts <[email protected]>
Allow users to provide an alternate toml config
v0.1.6 Merge pull request #35 from SuadeLabs/34-allow-users-to-provide-an-al…
Fix potential import error `place_module` form `isort`
v0.1.5 Merge pull request #33 from SuadeLabs/32-fix-import-error-place_modul…
Allow assignment to attributes on imported classes
v0.1.4 Merge pull request #31 from SuadeLabs/30-allow-assignment-to-attribut…