Skip to content

Releases: pwwang/python-varname

0.13.3

18 Jul 21:32
Compare
Choose a tag to compare
  • feat: support frame to allow wrapping for helpers.jsobj() (#111)

Full Changelog: 0.13.2...0.13.3

0.13.2

18 Jul 21:04
Compare
Choose a tag to compare
  • deps: bump up pytest to v8
  • feat: support vars_only to keep parents of an attribute for helpers.jsobj() (#110)

Full Changelog: 0.13.1...0.13.2

0.13.1

05 May 13:56
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.13.0...0.13.1

0.13.0

05 Feb 05:50
ea1ec82
Compare
Choose a tag to compare
  • style: change max line length to 88
  • style: clean up test code styles
  • feat: support subscript node for varname (#104)
  • ci: remove python3.8 from CI
  • breaking!: varname of a.b now returns "a.b" instead of "a"

What's Changed

Full Changelog: 0.12.2...0.13.0

0.12.2

29 Nov 05:43
be560cc
Compare
Choose a tag to compare
  • Add helpers.exec_code function to replace exec so that source code is available at runtime
from varname import argname
from varname.helpers import exec_code


class Obj:
    def __init__(self):
        self.argnames = []

    def receive(self, arg):
        self.argnames.append(argname('arg', func=self.receive))


obj = Obj()
# exec('obj.receive(1)')  # Error
exec_code('obj.receive(1)')
exec_code('obj.receive(2)')
print(obj.argnames)  # ['1', '2']

What's Changed

Full Changelog: 0.12.1...0.12.2

0.12.1

27 Nov 16:22
84320c6
Compare
Choose a tag to compare
  • Bump executing to 2.0.1

What's Changed

Full Changelog: 0.12.0...0.12.1

0.12.0

05 Oct 19:43
Compare
Choose a tag to compare
  • Support python 3.12
  • Update python3.12 to CI
  • Bump executing to ^2.0
  • Bump up other dependencies
  • Add Dockerfile for codesandbox

Full Changelog: 0.11.2...0.12.0

0.11.2

30 Jun 17:07
Compare
Choose a tag to compare
  • ✨ Add jsobj to create dict without explicitly specifying the key-value pairs

    from varname.helpers import jsobj
    
    a = 1
    b = 2
    # before
    dict(a=a, b=b, c=3)  # {'a': 1, 'b': 2, 'c': 3}
    
    # after
    jsobj(a, b, c=3)  # {'a': 1, 'b': 2, 'c': 3}

Full Changelog: 0.11.1...0.11.2

0.11.1

24 Apr 06:57
Compare
Choose a tag to compare
  • ✨ Support starred variable for varname() (#96)
  • ✅ Fix tests
  • 📝 Update docs for varname(strict=...)

Full Changelog: 0.11.0...0.11.1

0.11.0 (#92)

16 Feb 23:23
362a8a9
Compare
Choose a tag to compare
  • 📝 Update README for shields badges (#91)
  • 🏷️ Overload types for nameof and argname (#77)
  • 💥 Drop python <3.8 for v0.11
    If you need support for python <3.8, please use varname <0.11