Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We're always looking to drop unnecessary dependencies. While spaCy's dependencies are generally quite healthy (and mostly consist of our own libraries), we were still able to identify several libraries that we didn't actually need – and which dragged in a range of other dependencies.
We've already removed
six
(6d2c85f),html5lib
(mostly a workaround for asix
issue) andftfy
(ce6071c, ac88c72).The PR also replaces
requests
withurllib
/urllib2
. After inspecting the code again, it turned out that the library was only used in two places in the CLI and only to fetch JSON files. The new solution works fine on Python 3 – the Python 2 compatibility workaround still needs to be tested in detail.We'd also like to upgrade
msgpack-python
to the renamedmsgpack
(see here for details). The way the library was renamed was kind of awkward, and a recent update caused various problems for spaCy users. So we want to be careful here. Another difficulty is that this change needs to happen in sync with Thinc, which also depends onmsgpack-python
. Otherwise, it will result in clashing versions again.One option to solve this could be to only require
msgpack
viathinc
. This way, spaCy won't have to specify a separate dependency, and we won't have to worry about bothmsgpack
s being out of sync.Types of change
enhancement
Checklist