Open malkarouri opened 2 years ago
If Iterable
is added manually to vendor/typing.py
then the same test fails due to an AttribtuteError on Awaitable
. If Awaitable
is added then the test fails with a TypeError, because Iterable
and Callable
are defined as None
and are not subscriptable.
Ah OK thanks for the report, I have seen this kind of thing before... the typing
usage is a little subtle
Not sure what we should do about it at the moment.
I think maybe the easiest thing is to simply leave out the Python 3 tests like format_strings_test.py
.
I guess it doesn't fail on my machine because I have Python 3.6 which has a different standard library! Doh!
For now I would just remove 'mycpp' from this line and I think everything should work? Let me know if it doesn't
https://github.com/oilshell/oil/blob/master/test/unit.sh#L47
I will think about if we should do that permanently
Oh I guess the issue is that PYTHONPATH should include vendor/
for the Python 2 stuff, but NOT Python 3.
That might be the better fix, but let me know if commenting it out works
Removing mycpp
from test/unit.sh
makes the step work. In fact, the smoke and osh-all test report success as well.
OK great! I just made a commit to automate this, so please sync to HEAD.
Let me know if you have any more problems and questions about Oil!
I usually start with bin/osh -c 'echo hi'
and bin/osh -n -c 'echo hi'
and hack from there :)
Just did. The test passes cleanly now. Closing..
Thanks a lot. That was impressive! I will continue exploring and hacking.
Glad to hear it!
I'll leave this open until test/unit.sh all
works reliably, but at least test/unit.sh minimal
works now
Trying to follow Contributing on Ubuntu 20.04, with Python 2.7.18 and Python 3.8.10 installed. The command
build/dev.sh ubuntu-deps
fails aspython-pip
is not in Ubuntu 20.04 anymore so pip is installed manually. I am using the current code cloned today (commit b723e9af).The issue is when running
test/unit.sh minimal
:It seems that
mycpp/format_strings_test.py
fails as it runs Python 3 but imports typing fromvendor/typing
instead of the standard library, and the latter does not haveIterable
defined.