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

remove dependency to python-slugify #161

Open
areski opened this issue Mar 26, 2018 · 8 comments
Open

remove dependency to python-slugify #161

areski opened this issue Mar 26, 2018 · 8 comments

Comments

@areski
Copy link
Owner

areski commented Mar 26, 2018

related to #160

@lggwettmann
Copy link

Yes, please! It causes some pipenv dependency issues here, especially cause it's pinned to one single version only.

@PetrDlouhy
Copy link
Contributor

I have also encountered conflicts with unicode-slugify as dependency of django-categories: jazzband/django-categories#189
The solution seems to be to use Django builtin slugify for django-categories.

While the unicode-slugify package seems to be old unmaintained package, the python-slugify is maintained quite OK.

I am not sure, how could we approach this, because including relevant python-slugify functionality here would probably bring a lot of new code.

This is what python-slugify produces:

slugify("asdf ššč_олстой سل こんにちは 北京大学", separator="_")
'asdf_ssc_olstoi_sl_konnichiha_bei_jing_da_xue'

That doesn't seem to be trivial transition and I don't think simpler solution would always work.

Alternative approach might be to make the dependency optional and maybe even let users to configure that function.

@areski
Copy link
Owner Author

areski commented Apr 18, 2024

The slugify really brought little value to this package, it was to ensure the user don't enter something weird in the chartname as it's used to produce the html.
Changing this now might be quite complex and risk to break things for other users, and I don't see good reason why not to keep python-slugify.

@PetrDlouhy what's your motivation for removing python-slugify? (to understand a bit better)

@PetrDlouhy
Copy link
Contributor

@areski The django-categories package has dependency on unicode-slugify, which has the same folder name slugify as python-slugify.
So having these two packages in one project is big pain and can cause whole lot of problems (when the packages are interchanged randomly, because Python packaging systems don't ensure which one is finally installed.

It seems, that unicode-slugify could be removed from django-categories quite painlessly. So my project probably doesn't need any change in python-nvd3. But that might be different for @lggwettmann or others.

@areski
Copy link
Owner Author

areski commented Apr 18, 2024

Ok thanks for the clarification!

I wonder if we should consider hashing (md5) the chartname and remove slugify.

Any thought?

@PetrDlouhy
Copy link
Contributor

Hm, if somebody have scripts depending on the <div id="name"> value, we could break them. Also using hash could make the code quite unclear.

The possibility would be also to require users set the chart ID, which would make the transition at least explicit.

@areski
Copy link
Owner Author

areski commented Apr 18, 2024

Thanks for your inputs, 💯 agree with you!

@PetrDlouhy
Copy link
Contributor

And I don't think we need to solve this now. My case would be probably solved. I have written these comments mainly for the record and I think we could wait for more input from others.

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