spaCy/spacy/tokens
Paul O'Leary McCann 0f01f46e02
Update Cython string types (#9143)
* Replace all basestring references with unicode

`basestring` was a compatability type introduced by Cython to make
dealing with utf-8 strings in Python2 easier. In Python3 it is
equivalent to the unicode (or str) type.

I replaced all references to basestring with unicode, since that was
used elsewhere, but we could also just replace them with str, which
shoudl also be equivalent.

All tests pass locally.

* Replace all references to unicode type with str

Since we only support python3 this is simpler.

* Remove all references to unicode type

This removes all references to the unicode type across the codebase and
replaces them with `str`, which makes it more drastic than the prior
commits. In order to make this work importing `unicode_literals` had to
be removed, and one explicit unicode literal also had to be removed (it
is unclear why this is necessary in Cython with language level 3, but
without doing it there were errors about implicit conversion).

When `unicode` is used as a type in comments it was also edited to be
`str`.

Additionally `coding: utf8` headers were removed from a few files.
2021-09-13 17:02:17 +02:00
..
__init__.pxd * Break up tokens.pyx into tokens/doc.pyx, tokens/token.pyx, tokens/spans.pyx 2015-07-13 20:20:58 +02:00
__init__.py Fix SpanGroup import (#7182) 2021-02-24 21:06:16 +11:00
_dict_proxies.py Fix spans weak ref in doc copy (#7225) 2021-02-28 12:32:48 +11:00
_retokenize.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
_retokenize.pyx Fix tensor retokenization for non-numpy ops (#7527) 2021-03-29 22:34:48 +11:00
_serialize.py Update Cython string types (#9143) 2021-09-13 17:02:17 +02:00
doc.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
doc.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
doc.pyx Update Cython string types (#9143) 2021-09-13 17:02:17 +02:00
graph.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
graph.pyx Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
morphanalysis.pxd Modify morphology to support arbitrary features (#4932) 2020-01-23 22:01:54 +01:00
morphanalysis.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
morphanalysis.pyx Minor refactor for Morphology and MorphAnalysis (#5804) 2020-07-24 09:28:06 +02:00
span_group.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
span_group.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
span_group.pyx Replace links to nightly docs [ci skip] 2021-01-30 20:09:38 +11:00
span.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
span.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
span.pyx Update Cython string types (#9143) 2021-09-13 17:02:17 +02:00
token.pxd cleanup 2021-01-13 14:20:05 +01:00
token.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
token.pyx Update Cython string types (#9143) 2021-09-13 17:02:17 +02:00
underscore.py Remove object subclassing 2020-07-12 14:03:23 +02:00