Skip to content

Releases: SuadeLabs/rattr

v0.2.4

31 Jan 09:54
c6ec4c4
Compare
Choose a tag to compare
  • Use flexible requirement versions to improve external compatibility

Full Changelog: v0.2.3...v0.2.4

v0.2.3

14 Jan 12:18
d325345
Compare
Choose a tag to compare
  • Include the rattr version in the cache info

Full Changelog: v0.2.2...v0.2.3

v0.2.2

02 Aug 10:31
e9fa5ef
Compare
Choose a tag to compare

What's Changed

  • Fix regressions on identifying call target by
  • Fix error in CLI parser when terminal width is not determinable

v0.2.1

01 Jul 16:46
d73d692
Compare
Choose a tag to compare

Minor bug fixes:

  • fix circular import when importing rattr decorators

v0.2.0

03 Jun 15:42
a33f7c7
Compare
Choose a tag to compare

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 and generators of a GeneratorExpr.

Refactor:

  • Move to attrs for internal data structures. This will allow for quicker serialisation and deserialisation via cattrs 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

24 Jul 13:36
84a6898
Compare
Choose a tag to compare
Merge pull request #50 from SuadeLabs/49-fix-constant-in-namable-erro…

Support namedtuples in strict mode

24 Jul 10:05
9af861b
Compare
Choose a tag to compare
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

26 May 08:31
f71973a
Compare
Choose a tag to compare
v0.1.6

Merge pull request #35 from SuadeLabs/34-allow-users-to-provide-an-al…

Fix potential import error `place_module` form `isort`

24 May 13:49
692d581
Compare
Choose a tag to compare
v0.1.5

Merge pull request #33 from SuadeLabs/32-fix-import-error-place_modul…

Allow assignment to attributes on imported classes

01 Mar 14:05
5a26e39
Compare
Choose a tag to compare
v0.1.4

Merge pull request #31 from SuadeLabs/30-allow-assignment-to-attribut…