pndurette / gTTS

Python library and CLI tool to interface with Google Translate's text-to-speech API
http://gtts.readthedocs.org/
MIT License
2.31k stars 362 forks source link

Loosen dependencies if possible or at least make `click` optional #388

Closed barseghyanartur closed 1 year ago

barseghyanartur commented 1 year ago

Prerequisites

Proposed Behaviour

Loosen dependencies:

dependencies = [
    "requests~=2.28.0",
    "click>=7.1.1,<8.2",
    "six~=1.16.0"
]

Or if that somehow doesn't work - make click optional. Why should it be a required dependency if command line interface isn't a core functionality?

Context

ATM, deps are pinned quite hard. ATM, they are unresolvable for me.

dependencies = [
    "requests~=2.28.0",
    "click~=8.1.3",
    "six~=1.16.0"
]

Especially for click, lots of packages still use version 7.x. I'm not well familiar with click deprecations, but is it really necessary to use 8.x or would it be possible to loosen that part. Same goes for requests.

I had to do this now in order for dependencies to compile. The exact commit.

pndurette commented 1 year ago

@barseghyanartur Agreed, the pinning is pretty hard and it shouldn't be. Also, great idea to make click optional as most people use it as a library. The pinning is a result of me changing the way the package is built starting with 2.3.0 and yes agreed it's a little much. Will work on this, as this likely hits many other people.

pndurette commented 1 year ago

I've loosened deps for click and requests, and removed the need for six entirely! I like the idea of making the cli an optional, but it's too big of a change for the time being, but it will be added!

barseghyanartur commented 1 year ago

@pndurette:

Thanks! That works for me.