Varname

Latest version: v0.13.5

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

0.10.0

- ✨ Support python 3.11

What's Changed
* Python 3.11 support by alexmojaki in https://github.com/pwwang/python-varname/pull/89


**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.9.1...0.10.0

0.9.1

- ⬆️ Upgrade executing to 1.0

0.9.0

- ⬆️ Upgrade executing to 0.9
- 🗑️ Remove deprecated `argname2`
- ✨ Support constants for `argname` even when `vars_only=True`
- ✨ Support `__getattr__/__setattr__` etc for `argname`

Now you can do:
python
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
* 0.9.0 by pwwang in https://github.com/pwwang/python-varname/pull/84
* Fix CI docs building for 0.9.0 by pwwang in https://github.com/pwwang/python-varname/pull/85


**Full Changelog**: https://github.com/pwwang/python-varname/compare/0.8.3...0.9.0

0.8.3

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 of `pylint` for linting

0.8.2

Fixes
- 🩹 Use `sysconfig` instead of `distutils.sysconfig` to avoid deprecatewarning for python 3.10+ (71)

Housekeeping
- 👷 Add python3.10 in CI
- 📄 Add license back

0.8.1

- Handle inspect raises "could not get source code" when printing rich exception message

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.