voronind / awesome-slugify

Python flexible slugify function
https://pypi.python.org/pypi/awesome-slugify
484 stars 45 forks source link

Clash with zacharyvoase/slugify #42

Open Chris2048 opened 4 years ago

Chris2048 commented 4 years ago

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"?

ChrisBarker-NOAA commented 3 years ago

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 commented 3 years ago

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?

gargargarrick commented 3 years ago

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.

ChrisBarker-NOAA commented 3 years ago

"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.