Skip to content

Commit 8b1ea6a

Browse files
brukauYury Brukaupiskvorkympenkovmenshikh-iv
authored
Prepare gensim v3.8.2 to pin smart_open for Py2.7 compatibility (#2787)
* pin version of smart-open to py2 compatible * add a comment Co-Authored-By: Radim Řehůřek <me@radimrehurek.com> * make pin conditional (py27 only) * prepare version 3.8.2 * add deprecations to README * get rid rackcdn, bump scipy to 1.0.0 * bump scipy to 1.0.0 in setup.py Co-authored-by: Yury Brukau <brukau@ebu.ch> Co-authored-by: Radim Řehůřek <me@radimrehurek.com> Co-authored-by: Michael Penkov <misha.penkov@gmail.com> Co-authored-by: Ivan Menshikh <menshikh.iv@gmail.com>
1 parent 8420768 commit 8b1ea6a

File tree

4 files changed

+53
-16
lines changed

4 files changed

+53
-16
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
Changes
22
=======
33

4+
## 3.8.2, 2020-04-10
5+
6+
### :red_circle: Bug fixes
7+
8+
* Pin `smart_open` version for compatibility with Py2.7
9+
10+
### :warning: Deprecations (will be removed in the next major release)
11+
12+
* Remove
13+
- `gensim.models.FastText.load_fasttext_format`: use load_facebook_vectors to load embeddings only (faster, less CPU/memory usage, does not support training continuation) and load_facebook_model to load full model (slower, more CPU/memory intensive, supports training continuation)
14+
- `gensim.models.wrappers.fasttext` (obsoleted by the new native `gensim.models.fasttext` implementation)
15+
- `gensim.examples`
16+
- `gensim.nosy`
17+
- `gensim.scripts.word2vec_standalone`
18+
- `gensim.scripts.make_wiki_lemma`
19+
- `gensim.scripts.make_wiki_online`
20+
- `gensim.scripts.make_wiki_online_lemma`
21+
- `gensim.scripts.make_wiki_online_nodebug`
22+
- `gensim.scripts.make_wiki` (all of these obsoleted by the new native `gensim.scripts.segment_wiki` implementation)
23+
- "deprecated" functions and attributes
24+
25+
* Move
26+
- `gensim.scripts.make_wikicorpus` ➡ `gensim.scripts.make_wiki.py`
27+
- `gensim.summarization` ➡ `gensim.models.summarization`
28+
- `gensim.topic_coherence` ➡ `gensim.models._coherence`
29+
- `gensim.utils` ➡ `gensim.utils.utils` (old imports will continue to work)
30+
- `gensim.parsing.*` ➡ `gensim.utils.text_utils`
31+
432
## 3.8.1, 2019-09-23
533

634
### :red_circle: Bug fixes

docs/src/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
# The short X.Y version.
5858
version = '3.8'
5959
# The full version, including alpha/beta/rc tags.
60-
release = '3.8.1'
60+
release = '3.8.2'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

setup.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ def finalize_options(self):
276276
])
277277

278278
if (3, 0) < sys.version_info < (3, 7):
279-
linux_testenv.extend(['nmslib'])
280-
279+
linux_testenv.extend(['nmslib'])
280+
281281
docs_testenv = linux_testenv + distributed_env + [
282282
'sphinx',
283283
'sphinxcontrib-napoleon',
@@ -345,9 +345,24 @@ def finalize_options(self):
345345
extra_link_args=extra_args)
346346
)
347347

348+
install_requires = [
349+
NUMPY_STR,
350+
'scipy >= 1.0.0',
351+
'six >= 1.5.0',
352+
]
353+
354+
#
355+
# smart_open >= 1.11 is py3+ only.
356+
# TODO: Remove the pin once we drop py2.7 from gensim too.
357+
#
358+
if PY2:
359+
install_requires.append('smart_open >= 1.8.1, < 1.11')
360+
else:
361+
install_requires.append('smart_open >= 1.8.1')
362+
348363
setup(
349364
name='gensim',
350-
version='3.8.1',
365+
version='3.8.2',
351366
description='Python framework for fast Vector Space Modelling',
352367
long_description=LONG_DESCRIPTION,
353368

@@ -360,7 +375,7 @@ def finalize_options(self):
360375

361376
url='http://radimrehurek.com/gensim',
362377
download_url='http://pypi.python.org/pypi/gensim',
363-
378+
364379
license='LGPLv2.1',
365380

366381
keywords='Singular Value Decomposition, SVD, Latent Semantic Indexing, '
@@ -391,12 +406,7 @@ def finalize_options(self):
391406
setup_requires=[
392407
NUMPY_STR,
393408
],
394-
install_requires=[
395-
NUMPY_STR,
396-
'scipy >= 0.18.1',
397-
'six >= 1.5.0',
398-
'smart_open >= 1.8.1',
399-
],
409+
install_requires=install_requires,
400410
tests_require=linux_testenv,
401411
extras_require={
402412
'distributed': distributed_env,

tox.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,19 @@ addopts = -rfxEXs --durations=20 --showlocals --reruns 3 --reruns-delay 1
2222
[testenv]
2323
recreate = True
2424

25-
; rackcdn host only for windows wheels (numpy, scipy)
26-
install_command = python most_recent_pip_install.py --timeout=60 --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com --find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/ {env:TOX_PIP_OPTS:} {opts} {packages}
25+
install_command = python most_recent_pip_install.py {env:TOX_PIP_OPTS:} {opts} {packages}
2726

2827
deps =
2928
pip>=19.1.1
3029
py37: numpy==1.14.5
3130
py37: scipy==1.1.0
3231

3332
py27: numpy==1.11.3
34-
py27: scipy==0.18.1
33+
py27: scipy==1.0.0
3534
py35: numpy==1.11.3
36-
py35: scipy==0.18.1
35+
py35: scipy==1.0.0
3736
py36: numpy==1.11.3
38-
py36: scipy==0.18.1
37+
py36: scipy==1.0.0
3938

4039
linux: .[test]
4140
win: .[test-win]

0 commit comments

Comments
 (0)