fix: remove log message on import by donbowman · Pull Request #1398 · RDFLib/rdflib (original) (raw)

@donbowman
I agree this is considered bad practice, and probably should be removed, but I want to give you some context around why RDFLib has always printed the version of the library when imported.

The RDFLib project has been in constant and active development since 2001. It was originally written for Python 1.6.1, and in 2002 ported to Python 2.1. Back then, it was common for most python libraries to print their version to stdout when importing. It was actually considered best practice at that time. And while the rdflib code has been updated and tweaked to work on newer python versions over the last 20 years, a lot of the development practices in the codebase have not. One major reason for this, is because until fairly recently the rdflib codebase had been maintained by a small team consisting of remnants from the original developers, who still held onto the original development practices. Also important to note, the vast majority of contributors to RDFLib over the years are researchers, academics, ontologists, not software developers.

We, the new maintainers are slowly trying to fix issues like this as they pop up, but we need to be mindful of not changing too much too quickly. A lot of people have been using rdflib for 20 years, and expect it to operate in a specific way. For example, there is likely more than one textbook used in universities around the world which includes something like "type import rdflib in REPL, and you will see your currently installed RDFLib version printed in the output".

Having said that, I agree this is a good change, and should be removed before releasing the next version (actually probably should have been removed for v6.0.0, which included several other similar breaking changes).