awesome-slugify icon indicating copy to clipboard operation
awesome-slugify copied to clipboard

Clash with zacharyvoase/slugify

Open Chris2048 opened this issue 4 years ago • 4 comments

The project at https://github.com/zacharyvoase/slugify named "slugify" also has the module name "slugify".

pip install slugify

import slugify slugify.slugify(u"Héllø Wörld")

If you add both packages to your requirements.txt, what happens when you import "slugify"?

Chris2048 avatar Feb 26 '20 10:02 Chris2048

Answer: you will get whichever got installed last.

I"m not sure what anyone can do about this -- there is no authority for who gets to use what names for packages (except for standard library packages).

ChrisBarker-NOAA avatar Sep 09 '21 17:09 ChrisBarker-NOAA

NOTE: the project at: https://github.com/zacharyvoase/slugify hasn't been updated for 11 years. Des it even work with Python 3.6+ ?

This one is 5 years old, but still newer than that one. So I'd hope no one is using the much older one.

Also -- Are the APIs different? maybe it doesn't matter?

ChrisBarker-NOAA avatar Sep 09 '21 17:09 ChrisBarker-NOAA

It also conflicts with https://github.com/un33k/python-slugify, which is still actively updated. To my knowledge, the only solution is to install the packages in separate virtual environments.

gargargarrick avatar Sep 10 '21 07:09 gargargarrick

"To my knowledge, the only solution is to install the packages in separate virtual environments."

well, yes, but if you have a dependency on both, you are stuck :-)

Anyway, as you say, python-slugify is being actively maintained, I haven't tried it out yet, but I"ll probably simply use that instead.

ChrisBarker-NOAA avatar Sep 10 '21 19:09 ChrisBarker-NOAA