sqlalchemy / sqlalchemy/dogpile.cache
support python3 keyword-only arguments for function decorator
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 299
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Migrated issue, originally created by Anonymous
getargspec() is deprecated in python 3.0
When running against 3.5, I get the following ValueError...
File "/.pyenv/versions/env/lib/python3.5/site-packages/dogpile/cache/region.py", line 1037, in decorator/.pyenv/versions/env/lib/python3.5/site-packages/dogpile/cache/util.py", line 73, in function_key_generator
key_generator = function_key_generator(namespace, fn)
File "
args = inspect.getargspec(fn)
File "~/.pyenv/versions/3.5.0/lib/python3.5/inspect.py", line 1044, in getargspec
raise ValueError("Function has keyword-only arguments or annotations"
ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in dogpile/cache/util.py at function_key_generator, where inspect.getargspec(fn) raises for keyword-only arguments; review its use from dogpile/cache/region.py around the reported decorator path. Reproduce the failure on Python 3.5 with a function containing keyword-only arguments, and consider the issue done when the decorator accepts that function without the shown ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100