clj-python / clj-python/libpython-clj
from-import does not support "string"
Open
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.2k
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
This syntax cannot be used in libpython-clj,
from yellowbrick.contrib.wrapper import CLASSIFIER
when classifier is a String.
(py/from-import yellowbrick.contrib.wrapper CLASSIFIER)
fails with
Unhandled java.lang.IllegalArgumentException
No implementation of method: :get-attr of protocol:
#'libpython-clj2.python.protocols/PPyAttr found for class: java.lang.String
core_deftype.clj: 583 clojure.core/-cache-protocol-fn
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 at the py/from-import entry point and reproduce the failure using yellowbrick.contrib.wrapper with CLASSIFIER as a string. Trace how the import target is resolved when it reaches the PPyAttr protocol error. Done means the shown from-import form accepts a string classifier without the IllegalArgumentException and has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100