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
[MRG] remove py2 support #141
Conversation
closes #140 |
Codecov Report
@@ Coverage Diff @@
## master #141 +/- ##
==========================================
- Coverage 94.38% 94.37% -0.01%
==========================================
Files 14 14
Lines 979 978 -1
==========================================
- Hits 924 923 -1
Misses 55 55
Continue to review full report at Codecov.
|
Can you add a note to the readme that we support only Python 3 now? |
I can't make review comments in the right places, but there are a few places where we should migrate to my py3-thonic code: Line 57 in e26de96
Also, Line 350 in e26de96
and Line 366 in e26de96
should raise FileExistsError (and some tests etc will need to be updated to reflect this correctly...)
These are just a few I can think of from a quick scan but there are probably more. |
@monkeyman192, if @teonbrooks is fine with it, you can also send a PR to Also, we should be explicit about which python 3 version, ... 3.6? |
I normally spec my code for about 3.4 at the earliest (because I am still running 3.4 on one or two of my machines), however I don't think there is really anything in here that would really change across 3.x versions (other than maybe changing pathing things to path-like objects instead of simply strings which was 3.6 iirc) |
PRs are definitely welcome. I don't know what the more pythonic way would be for those blocks of code you mentioned.
I agree, we should list a minimum python version. is it 3.4 or 3.6? |
I think we should support all of Python 3 if it's not too much work. It's just nicer for the users if it doesn't come at an extra cost of code complexity. Otherwise, they will have to switch environments just to use mne-bids ... |
README.md
Outdated
@@ -16,7 +16,8 @@ Installation | |||
------------ | |||
|
|||
We recommend the [Anaconda](https://www.anaconda.com/download/) Python | |||
distribution. Besides `numpy`, `scipy`, `matplotlib`, and `pandas` (which are | |||
distribution. We require that you use a minimum Python version of 3.4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say python 3 ... so we sync with MNE
@@ -3,7 +3,6 @@ node_js: | |||
language: python | |||
|
|||
env: | |||
- PYTHON_VERSION=2.7 | |||
- PYTHON_VERSION=3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasmainak, if we do want all version of Python 3, should we change the environment to a lower version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you read my mind. I was thinking the same ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems that mne is using 3.6 even though it generically states py3. also travis and appveyor yelled about 3.0 not being found. i will be revert back to 3.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we don't need to be worried about other python versions if mne is not worried ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teonbrooks you still need to address @monkeyman192 's comments
1f458c4
to
a177688
Compare
I did. #141 (comment). It should be a separate pr because making the code more py3 pythonic isn't a blocker for remove py2 support. |
you just need to replace all occurences of |
ok, added those. I just assumed that there were more py3ism that were to be implemented so I was just going to save them all. I updated to account for that find/replace. |
Good to go on my end. |
thanks @teonbrooks! :-) |
Oh yeah, my comment was more of a general one about the possibility of updating any code that could be nicer using python 3 syntax/functions. Edit: Ok, there were a few little things to fix, nothing major, but I made it a little bit cleaner I think... Should I make a separate PR or something else? (it's only a few small changes...)(cf. monkeyman192@6fdfe2b) |
@monkeyman192 yes, a separate pr would be great |
PR to remove py2 support from
mne-bids
.mne-python
has removed compatibility for py2 and we depend on it. we no longer havemne.externals.six
to maintain compatibility.