Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python2.7: gensim 2.2.0: requirements state six>=1.5.0, but actually requires six>= 1.9 #1495

Closed
HodorTheCoder opened this issue Jul 21, 2017 · 13 comments

Comments

@HodorTheCoder
Copy link
Contributor

HodorTheCoder commented Jul 21, 2017

Hello,

Gensim latest version from pip2 for python2.7 lists requirements for six to be >=1.5.0, but the import breaks with six=1.7.3, at:

from six import viewitems, string_types

in

/usr/local/lib/python2.7/dist-packages/gensim/topic_coherence/text/analysis.py

The library "six" has no viewitems module until version 1.9-ish.

When you do --upgrade with pip it upgrades six to 1.10 which fixes it, but that doesn't solve the problem of the initial requirement being wrong.

Thanks.

Description

TODO: change commented example

Steps/Code/Corpus to Reproduce

Expected Results

Actual Results

Versions

@piskvorky
Copy link
Owner

Sorry about that! Six 1.5.0 should be fine, it's just this module should be importing iteritems instead of viewitems.

@menshikh-iv aren't we pinning the oldest supported versions of dependencies, for CI testing?

Also, I don't think I wrote this code. Why does it say Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>?

@menshikh-iv
Copy link
Contributor

@piskvorky for CI we pinning only scipy/numpy versions for testing purposes.

@piskvorky
Copy link
Owner

piskvorky commented Jul 22, 2017

OK. Let's pin everything, to prevent issues like this.

Ideally, we'd have a CI matrix of version combinations to test. We definitely want to test the earliest versions we support, and the latest (most recent). Something in between would be nice too, but not as critical.

@HodorTheCoder @menshikh-iv can you fix this issue by removing the viewitems? iteritems better, no need to introduce more restrictive dependencies for no reason.

@HodorTheCoder
Copy link
Contributor Author

HodorTheCoder commented Jul 22, 2017 via email

@menshikh-iv
Copy link
Contributor

@piskvorky about old/newest versions - it's a good idea, but this will increase the test execution time significantly (from ~25 to 50 minutes for linux CI, from 1h to 2h for windows CI and so on). For this reason, we should to pinned only earliest versions I think.

@piskvorky
Copy link
Owner

Computer time is cheap (~free). Also, why not run them in parallel? Is there any dependency?

@HodorTheCoder
Copy link
Contributor Author

Changing from viewitems to iteritems fixes this, and tests pass. I didn't submit a pull request, but I can if you want. Thanks.

@piskvorky
Copy link
Owner

Yes, PR please. Thanks a lot!

@HodorTheCoder
Copy link
Contributor Author

Stupid question. I created a new branch, but can't seem to push it up to the mothership to to open a PR against-- insufficient privileges (permission denied). Do I need to fork instead, or just use another existing branch? (I'm using the https url, not ssh, as origin). Thanks.

@menshikh-iv
Copy link
Contributor

@HodorTheCoder

  1. Fork gensim repo to your github account
  2. Clone your fork to PC
  3. Create a new branch git checkout -b my-new-feature
  4. Make changes, commit it and push
  5. Go to original repo and create PR

@HodorTheCoder
Copy link
Contributor Author

HodorTheCoder commented Jul 26, 2017 via email

@HodorTheCoder
Copy link
Contributor Author

PR submitted.

@menshikh-iv
Copy link
Contributor

Resolved in #1508.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants