From my <thread yesterday> I’m working on a `pep62...
# general
f
From my thread yesterday I’m working on a
pep621_requirements
target. I’ve more-or-less copied the code for
poetry_requirements
and changed a few names, and where the parser looks for the dependencies in the
pyproject.toml
file
😎 2
I’ve got a
ValueError
:
ValueError: The value pyproject.toml must be wrapped in an iterable (e.g. a list).
Although I suspect it’s from the instantiation of the
Address
.
I have no idea why this wouldn’t work, if
poetry_requirements
works… I can’t see anything I’ve changed that would result in this particular error
The final exception that’s raised is
Copy code
InvalidFieldTypeException: The 'sources' field in target src/experiment_service/pyproject.toml:experiment_service_requirements must be an iterable of strings (e.g. a list of strings), but was `'pyproject.toml'` with type `str`.
p
I’m so excited to see
pep621_requirements
. I would love to get away from requirements.txt files.
❤️ 1
h
Hey @future-oxygen-10553, can you post your work-in-progress to a repo we can clone and look at? That would be the easiest way to debug
f
Sure thing
p
That exception suggests that you have
sources="pyproject.toml"
instead of
sources=["pyproject.toml"]
. Maybe check your default value to make sure it is a list or tuple.
1
h
You probably want to use
SingleSourceField
also, so it's
source="pyproject.toml"
p
Eventually (in v2.0), Poetry will support PEP 621 as well: https://twitter.com/SDisPater/status/1521932867214921728
❤️ 2