add "# cython: language_level=3" directive to .pyx files, fixes #4214

in master branch, it was possible to do this via setup.py's
cythonize() calls, but we do not have them in 1.1.

thus, i modified the source files, setting the language level to 3,
which is supported since long in Cython (3str is only supported since
recently so might fail with older Cython versions).

Before this changeset, current Cython 0.29.x emitted a FutureWarning,
but still compiled. The next major release of Cython is said to emit
an error instead, so this changeset hopefully avoids the build breaking
after a Cython upgrade.
This commit is contained in:
Thomas Waldmann 2019-01-05 20:12:32 +01:00
parent d2cf09c095
commit c188a0b0bc
10 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,5 @@
# cython: language_level=3
from ..helpers import bin_to_hex
from libc.stdint cimport uint32_t

View file

@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# cython: language_level=3
API_VERSION = '1.1_01'

View file

@ -1,3 +1,5 @@
# cython: language_level=3
"""
borg.compress
=============

View file

@ -1,3 +1,5 @@
# cython: language_level=3
"""A thin OpenSSL wrapper"""
import hashlib

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# cython: language_level=3
from collections import namedtuple
import locale
import os

View file

@ -1,3 +1,5 @@
# cython: language_level=3
import stat
from collections import namedtuple

View file

@ -1,3 +1,5 @@
# cython: language_level=3
import os
from ..helpers import user2uid, group2gid

View file

@ -1,3 +1,5 @@
# cython: language_level=3
import os
from ..helpers import posix_acl_use_stored_uid_gid

View file

@ -1,3 +1,5 @@
# cython: language_level=3
import os
import re
import stat

View file

@ -1,3 +1,5 @@
# cython: language_level=3
import errno
import os