* Add Python 2/3 compatibility fix for copy_reg

This commit is contained in:
Matthew Honnibal 2015-10-13 20:04:40 +11:00
parent 79328e895c
commit 7a15d1b60c
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,6 @@ import io
import math import math
import json import json
import tempfile import tempfile
import copy_reg
from .lexeme cimport EMPTY_LEXEME from .lexeme cimport EMPTY_LEXEME
from .lexeme cimport Lexeme from .lexeme cimport Lexeme
@ -29,6 +28,11 @@ from . import util
from .serialize.packer cimport Packer from .serialize.packer cimport Packer
from .attrs cimport PROB from .attrs cimport PROB
try:
import copy_reg
except ImportError:
import copyreg as copy_reg
DEF MAX_VEC_SIZE = 100000 DEF MAX_VEC_SIZE = 100000