Releases: pwwang/python-varname
Releases · pwwang/python-varname
0.12.0
- 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
-
✨ Add
jsobj
to create dict without explicitly specifying the key-value pairsfrom 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
0.11.0 (#92)
0.10.0
- ✨ Support python 3.11
What's Changed
- Python 3.11 support by @alexmojaki in #89
Full Changelog: 0.9.1...0.10.0
0.9.1 (#87)
- ⬆️ Upgrade executing to 1.0
0.9.0
-
⬆️ Upgrade executing to 0.9
-
🗑️ Remove deprecated
argname2
-
✨ Support constants for
argname
even whenvars_only=True
-
✨ Support
__getattr__/__setattr__
etc forargname
Now you can do:
from varname import argname class Foo: def __getattr__(self, name): """Similar for `__getitem__`""" print(argname("name")) def __setattr__(self, name, value): """Similar for `__setitem__`""" print(argname("name")) print(argname("value")) def __add__(self, other): """Similar for `__sub__`, `__mul__`, `__truediv__`, `__floordiv__`, `__mod__`, `__pow__`, `__lshift__`, `__rshift__`, `__matmul__`, `__and__`, `__xor__`, `__or__` """ print(argname("other")) def __eq__(self, other): """Similar for `__lt__`, `__le__`, `__gt__`, `__ge__`, `__ne__` """ print(argname("other")) foo = Foo() b = 1 foo.x # prints: 'x' (note the quotes) foo.x = b # prints: 'x' and b foo + b # prints: b foo == b # prints: b
What's Changed
Full Changelog: 0.8.3...0.9.0
0.8.3 (#74)
This is more of a housekeeping release:
- ⬆️ Upgrade
executing
to 0.8.3 to make varname work with ipython 8+ - 📝 Update
README.md
to add new contributors - 🚨 Use
flake8
instead ofpylint
for linting
0.8.2 (#72)
Fixes
- 🩹 Use
sysconfig
instead ofdistutils.sysconfig
to avoid deprecatewarning for python 3.10+ (#71)
Housekeeping
- 👷 Add python3.10 in CI
- 📄 Add license back
0.8.1 (#65)
- Handle inspect raises "could not get source code" when printing rich exception message