beeware / voc

A transpiler that converts Python code into Java bytecode

Home Page:http://beeware.org/voc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3.7 (and 3.8 just around the corner)

jayvdb opened this issue · comments

I've run some tests against Python 3.7, with 113 falures, but a large percentage of the failures are repeated differences only in the expected exception messages, such as

- <class 'TypeError'> : must be str, not type
+ <class 'TypeError'> : can only concatenate str (not "type") to str

That one is really common, with minor variation like str->double etc for each native type. Also common:

- <class 'TypeError'> : object() takes no parameters
?                                         -  ^   --
+ <class 'TypeError'> : object() takes no arguments
?                                           ^^  +

Others are like

- <class 'TypeError'> : not all arguments converted during bytes formatting
+ <class 'TypeError'> : %b requires a bytes-like object, or an object that implements __bytes__, not 'int'

I think it would be useful to have the code or test suite handle those differences, so that the real errors stand out more.

Completely agreed - and there are many places in the existing codebase where we have analogous adaptations for changes in error message introduced by other Python versions.

If you search for uses of if (org.python.VERSION < 0x03040300) {, you'll see how this is being handled for other Python versions.

We'd also need to update our CI infrastructure to support Python 3.8 to provide meaningful testing for this change.