Adding type hints to OpenStack (starting with Oslo)

Doug Hellmann doug at doughellmann.com
Sat Jan 26 18:13:00 UTC 2019



> On Jan 26, 2019, at 10:05 AM, Cyril Roelandt <cyril at redhat.com> wrote:
> 
> Hello Doug,
> 
>> On 01/26/19 09:02, Doug Hellmann wrote:
>> We're still required to support python 2 through the beginning of the U
>> cycle [5]. Is it possible to apply the type hints in a way that allows
>> us to maintain that support?
>> 
>> [5] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
> 
> There are two ways to apply type hints:
> 1) Use a new syntax that only works with Python 3
> 2) Use comments (see my github branch, where comments starting with
> "type:" can be found)
> 
> I used the second approach in order to not break Python 2 compatibility.
> 
> 
> Regards,
> Cyril

Ok, good. I don’t have any issue with experimenting with type hints, and they might be useful. Why don’t you go ahead and submit your patches to gerrit so we can see what they look like and review them there. 

Doug





More information about the openstack-discuss mailing list