Coming to this week, it’s mostly been getting a huge chunk of my work ready to be merged and finally getting it merged.

In the last meeting, my mentor - Micheal mentioned the plans for releasing the next version of CWL Specification v1.0.1 as a “errata / clarification” spec revision to be released by the end of the July and resultantly, cwltool will be modified heavily in the process. Thus, it was important to start getting everything merged.

I started out by merging my two separate branches mypy_updates and modernize and pulling upstream changes and fixing merge conflicts. Micheal was quick enough to respond and we finally got my schema_salad PR merged mid-week. Happy to share that we have started using Python 3 compatible schema_salad v2.6 in cwltool now.

As discussed in the previous blog post, using unicode_literals had its benefits but it was breaking mypy badly. The problem mainly emerges from the fact that many typeshed stubs only accept str when ascii-only unicode values also work at runtime with Python 2.7 stdlib. This causes a lot of problems with code using unicode_literals since generally, most literals will have unicode as their type due to the __future__ import.

I had previously reported the errors related to it here and very recently mentioned it again. This time around Guido himself replied:

guido_comment

I discussed the same with Micheal, and we decided on dropping unicode_literals. michael_reply

You can read more about the mypy errors due to unicode_literals at: mypy/issues/3619 and mypy/issues/1954

This meant changing mypy annotations again and fixing up things. Luckily, it didn’t take much time and I finally got my PR for cwltool ready by the weekend. We plan on getting it merged early this week.

This marks a lot of compatibility code merged and ready to be used in production. I am targeting on getting Apache Avro issues resolved soon which is the only major bottleneck that remains on the road to Python 3 now.