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

Why is Chardet a dependency? #272

Open
dhensen opened this issue Feb 24, 2023 · 3 comments
Open

Why is Chardet a dependency? #272

dhensen opened this issue Feb 24, 2023 · 3 comments

Comments

@dhensen
Copy link

dhensen commented Feb 24, 2023

Because of strict licensing regulations at our company we can not use pyexcel, because chardet has the LGPL license.
Upon inspection I see that nowhere the chardet library is imported. When I clone this project, switch to v0.7.0 branch and remove the chardet depdendency everywhere, I can run a succesfull test suite.

Can chardet be removed or is there a reason that chardet has to remain as a dependency of pyexcel?

@dhensen
Copy link
Author

dhensen commented Feb 24, 2023

When searching for "chardet" in your whole organization I find a single occurence of chardet actually being used in python code:

https://github.com/pyexcel/pyexcel-io/blob/c7039124b2ab2d069f9955e38d10ac790c3c5389/pyexcel_io/readers/csvz.py#L46

note that this in pyexcel-io package

Did you maybe forget to move chardet to the requirements.txt for pyexcel-io? it's not in there.

@dhensen
Copy link
Author

dhensen commented Mar 15, 2023

@chfw if you have some spare time it would be really appreciated if you could take a look at this one

@dhensen
Copy link
Author

dhensen commented Mar 15, 2023

@chfw I think I know what happened:
In #247 I think you were adding github workflows to run your tests, I think your pipeline then failed complaining about not having chardet.

I think you then added chardet to pyexcel/pyexcel, but this code is only used by pyexcel/pyexcel-io. I think it should have been added as a requirement for that package and not toplevel on pyexcel/pyexcel.

Our problem is that we (currently I work for a corporate fin. comp) can not use LGPL packages, so we can not use chardet.

To fix this:

  1. move dependency from pyexcel/pyexcel to pyexcel/pyexcel-io
  2. mark chardet for pyexcel/pyexcel-io as extras package
  3. try/except around import chardet and supply a basic encoding for csvz/tsvz zipfile encode guessing. I can do a PR for this

dhensen added a commit to dhensen/pyexcel that referenced this issue Mar 15, 2023
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

1 participant