mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Drop six and related hacks as a dependency
This commit is contained in:
		
							parent
							
								
									9e83513004
								
							
						
					
					
						commit
						6d2c85f428
					
				| 
						 | 
				
			
			@ -6,7 +6,6 @@ preshed>=1.0.0,<2.0.0
 | 
			
		|||
thinc>=6.10.1,<6.11.0
 | 
			
		||||
murmurhash>=0.28,<0.29
 | 
			
		||||
plac<1.0.0,>=0.9.6
 | 
			
		||||
six
 | 
			
		||||
ujson>=1.35
 | 
			
		||||
dill>=0.2,<0.3
 | 
			
		||||
requests>=2.13.0,<3.0.0
 | 
			
		||||
| 
						 | 
				
			
			@ -16,4 +15,3 @@ pytest>=3.0.6,<4.0.0
 | 
			
		|||
mock>=2.0.0,<3.0.0
 | 
			
		||||
msgpack-python==0.5.4
 | 
			
		||||
msgpack-numpy==0.4.1
 | 
			
		||||
html5lib==1.0b8
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -191,8 +191,6 @@ def setup_package():
 | 
			
		|||
                'preshed>=1.0.0,<2.0.0',
 | 
			
		||||
                'thinc>=6.10.1,<6.11.0',
 | 
			
		||||
                'plac<1.0.0,>=0.9.6',
 | 
			
		||||
                'six',
 | 
			
		||||
                'html5lib==1.0b8',
 | 
			
		||||
                'pathlib',
 | 
			
		||||
                'ujson>=1.35',
 | 
			
		||||
                'dill>=0.2,<0.3',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
# coding: utf8
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
import six
 | 
			
		||||
import ftfy
 | 
			
		||||
import sys
 | 
			
		||||
import ujson
 | 
			
		||||
| 
						 | 
				
			
			@ -47,9 +46,10 @@ is_windows = sys.platform.startswith('win')
 | 
			
		|||
is_linux = sys.platform.startswith('linux')
 | 
			
		||||
is_osx = sys.platform == 'darwin'
 | 
			
		||||
 | 
			
		||||
is_python2 = six.PY2
 | 
			
		||||
is_python3 = six.PY3
 | 
			
		||||
is_python_pre_3_5 = is_python2 or (is_python3 and sys.version_info[1]<5)
 | 
			
		||||
# See: https://github.com/benjaminp/six/blob/master/six.py
 | 
			
		||||
is_python2 = sys.version_info[0] == 2
 | 
			
		||||
is_python3 = sys.version_info[0] == 3
 | 
			
		||||
is_python_pre_3_5 = is_python2 or (is_python3 and sys.version_info[1] < 5)
 | 
			
		||||
 | 
			
		||||
if is_python2:
 | 
			
		||||
    bytes_ = str
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,9 +2,9 @@
 | 
			
		|||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from ....parts_of_speech import SPACE
 | 
			
		||||
from ....compat import unicode_
 | 
			
		||||
from ...util import get_doc
 | 
			
		||||
 | 
			
		||||
import six
 | 
			
		||||
import pytest
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -24,8 +24,8 @@ def test_tag_names(EN):
 | 
			
		|||
    text = "I ate pizzas with anchovies."
 | 
			
		||||
    doc = EN(text, disable=['parser'])
 | 
			
		||||
    assert type(doc[2].pos) == int
 | 
			
		||||
    assert isinstance(doc[2].pos_, six.text_type)
 | 
			
		||||
    assert isinstance(doc[2].dep_, six.text_type)
 | 
			
		||||
    assert isinstance(doc[2].pos_, unicode_)
 | 
			
		||||
    assert isinstance(doc[2].dep_, unicode_)
 | 
			
		||||
    assert doc[2].tag_ == u'NNS'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user