From 8199012d26b12caf0a3791676e213c5a29966be0 Mon Sep 17 00:00:00 2001 From: alvations Date: Wed, 30 Sep 2015 20:10:15 +0200 Subject: [PATCH] changing deprecated codecs.open to io.open =) --- spacy/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/util.py b/spacy/util.py index 1d48ab7e9..34a660c4c 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -1,5 +1,5 @@ from os import path -import codecs +import io import json import re @@ -7,7 +7,7 @@ DATA_DIR = path.join(path.dirname(__file__), '..', 'data') def utf8open(loc, mode='r'): - return codecs.open(loc, mode, 'utf8') + return io.open(loc, mode, encoding='utf8') def read_lang_data(data_dir):