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

add python2.7 compatibility #255

Merged
merged 10 commits into from
Dec 2, 2020
Merged

Conversation

treymarc
Copy link
Contributor

@treymarc treymarc commented Dec 1, 2020

fix for #254

try python3 and fallback to python2

pytest should pass, lets see

try python3 and fallback to python2
@codecov
Copy link

codecov bot commented Dec 1, 2020

Codecov Report

Merging #255 (5ee3eae) into master (2d32934) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #255   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          308       315    +7     
=========================================
+ Hits           308       315    +7     
Impacted Files Coverage Δ
gtts/tts.py 100.00% <100.00%> (ø)
gtts/version.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f6517e...5ee3eae. Read the comment docs.

@pndurette
Copy link
Owner

pndurette commented Dec 2, 2020

Thanks for this @treymarc! Not everyone wants to touch 2.7 these days.
Typically I would say screw 2.7, but this is a neat quick fix until 2.7 support is officially gone in gTTS (which it wasn't so I feel I have the obligation to make it work for at least the next release).

One thing, do you mind adding 2.x to the testing matrix in: https://github.com/pndurette/gTTS/blob/master/.github/workflows/test.yml#L19

See if that passes?

update github action matrix
@treymarc
Copy link
Contributor Author

treymarc commented Dec 2, 2020

test are broken with python2.7 as they requires pytest>=6.1 :(

ref : https://github.com/pndurette/gTTS/runs/1483489636

@MarcTreySonos
Copy link
Contributor

testing this code with python2.7 is working

from gtts import gTTS
tts = gTTS('hello')
tts.save('hello.mp3')

pytest needs >= 6.1
@pndurette
Copy link
Owner

pndurette commented Dec 2, 2020

Alright thanks @treymarc / @MarcTreySonos!

We're already doing a big favour to the world by releasing an update for a 2.7 package. I did update pytest for no real reason other than it was old, it could most likely be downgraded back to the last 2.7 version 4.6.11.

Let me do something I haven't done in a while, build a 2.7 virtualenv to try that out.
Edit: Beat me to it I see, hehe.

MarcTreySonos and others added 3 commits December 2, 2020 02:10
ensure python2.7 compatibility
add python2.7 in the gh ci build
Copy link
Owner

@pndurette pndurette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pndurette
Copy link
Owner

Amazing, looks like Python 2.7 is back in business, against all odds. Thank you so much!

@pndurette pndurette merged commit b36103d into pndurette:master Dec 2, 2020
@pndurette
Copy link
Owner

Will release this shortly!

@treymarc
Copy link
Contributor Author

treymarc commented Dec 2, 2020

thank you 👌

@treymarc treymarc deleted the python2.7_compat branch December 2, 2020 01:31
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

Successfully merging this pull request may close these issues.

3 participants