set cython level to 3
MODIFY
fastavro/_read.pyx
fastavro/_read.pyx
+# cython: language_level=3str
# cython: auto_cpdef=True
"""Python code for reading AVRO files"""

MODIFY
fastavro/_schema.pyx
fastavro/_schema.pyx
+# cython: language_level=3str
# cython: auto_cpdef=True
from os import path

MODIFY
fastavro/_six.pyx
fastavro/_six.pyx
+# cython: language_level=3str
# cython: auto_cpdef=True
'''Compatiblity for Python versions.

MODIFY
fastavro/_validation.pyx
fastavro/_validation.pyx
+# cython: language_level=3str
+
import datetime
import decimal
import numbers

MODIFY
fastavro/_write.pyx
fastavro/_write.pyx
+# cython: language_level=3str
+
"""Python code for writing AVRO files"""
# This code is a modified version of the code at
@@ -77,7 +79,7 @@ cpdef long64 prepare_timestamp_millis(object data, schema):
time_tuple.tm_isdst = PyInt_AS_LONG(<object>(PyTuple_GET_ITEM(tt, 8)))
return mktime(& time_tuple) * MLS_PER_SECOND + <long64>(
- data.microsecond) / 1000
+ int(data.microsecond) / 1000)
else:
return <long64>(<double>(data.timestamp()) * MLS_PER_SECOND)
else:

set cython level to 3