[lldb-dev] Deprecating Python2 and adding type-annotations to the python API
Jonas Devlieghere via lldb-dev
lldb-dev at lists.llvm.org
Mon Aug 3 17:37:26 PDT 2020
Hi Nathan,
Thanks for bringing this up. I've been expecting this question for a while
now.
Python 2 is end-of-life and we should move to Python 3. I'm pretty sure
nobody here disagrees with that. Unfortunately though, we still have
consumers, both internally and externally, that still rely on it. We're
actively making an effort to change that, but we're not quite there yet.
That said, I think we should continue moving in that direction. In line
with the rest of LLVM moving to Python 3 by the end of the year, we've
already made it the default. All our bots on GreenDragon are also building
against Python 3.
As a first step, for the next release, I propose we remove the fallback to
Python 2 and make it the only supported configuration. At the same time we
can convert any scripts and tools (I'm thinking of the lit configurations,
the lldb-dotest and lldb-repro wrappers, etc) to be Python 3 only. During
this time however, we'd ask that the bindings and the test suite remain
compatible with Python 2. Given that Python 3 is the only supported
configuration for developers, we'd take on the burden of maintaining Python
2 compatibility in the test suite and correcting (accidental)
incompatibilities.
When the 12.0 release is cut, we can reconsider the situation. If we're
still not ready by then to drop Python 2 support, I propose another
intermediate step where we remove Python 2 support from the upstream
repository, but ask the community to not actively modernize the test suite
and the bindings. In this situation we'd be dealing with the merge
conflicts in our downstream fork and this would avoid an endless number of
conflicts in the test suite.
Finally, presumably after the 13.0 release, we'd drop that last
requirement.
Please let me know if you think that sounds like a reasonable timeline.
Thanks,
Jonas
On Mon, Aug 3, 2020 at 3:11 PM Nathan Lanza via lldb-dev <
lldb-dev at lists.llvm.org> wrote:
> As a user of the lldb python scripting API I would love to see type
> annotations on the scripting APIs. I posted this diff the other day -
> https://reviews.llvm.org/D84269. Pavel commented that this would require
> deprecating python2 and that the recent 11.0 branch cut might make this a
> good time to do this. So how do people feel about removing python2 support
> and moving the APIs more towards modern python3?
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200803/1eef4b0f/attachment.html>
More information about the lldb-dev
mailing list