News for hackers. Stuff that matters.
Re:Interfaces and Protocols in Python by rbanffy on Monday April 26, 2021 @07:30AM (#26941403)
If you do this, I urge you to add lots of comments explaining what and why you are doing it. All this is relatively new and will be very confusing to the people reading your code.
Re:Interfaces and Protocols in Python by Recursing on Monday April 26, 2021 @08:46AM (#26941921)
Actually, zope.interface has been around for 20 years. It just became almost abandoned like the rest of Zope with the era of Django/Flask (and the zope 3 debacle). Nowadays I think Twisted, Pyramid and Plone are the only "famous" projects left using it
Re:Interfaces and Protocols in Python by runfalk on Monday April 26, 2021 @10:53AM (#26943123)
It's also used by certbot, pyjwt, ckan, proxy.py, scrapy, etc. The list is pretty long but I do agree with you that the majority of packages neither use nor should use it.

https://github.com/zopefoundation/Zope/network/dependents?de...

Re:Interfaces and Protocols in Python by btown on Monday April 26, 2021 @10:34AM (#26942916)
What was the Zope 3 debacle exactly? I have vague memories of something like that from back in the day, but having trouble finding anything concrete.
Re:Interfaces and Protocols in Python by toolslive on Monday April 26, 2021 @11:47AM (#26943830)
well, it was more or less the same thing as the python3 debacle. Imagine having a big python2 project and all the cool stuff is happening in python3. You can't upgrade without substantial effort (code & testing). Now replace python2 with zope2 and python3 with zope3. You get the idea.
Re:Interfaces and Protocols in Python by Recursing on Monday April 26, 2021 @10:56AM (#26943164)
I honestly don't really know, and would also be curious to find out what happened exactly that made Zope almost disappear
Re:Interfaces and Protocols in Python by rbanffy on Monday April 26, 2021 @09:48AM (#26942453)
zope.interface was never widely adopted.
Re:Interfaces and Protocols in Python by Recursing on Monday April 26, 2021 @10:16AM (#26942733)
That is true, but I think there was a point in time (2000-2001?) where Zope was very much the dominant python web framework, and the Zope foundation employed many python core developers.

It's even mentioned in the history of python https://docs.python.org/3/license.html

Re:Interfaces and Protocols in Python by rbanffy on Monday April 26, 2021 @12:03PM (#26944072)
Zope was always a decade ahead of its time in the Python space and at least two in the general web framework space.

When I had to explain it to clients I joked it suffered from “Martian Technology Syndrome”.

Re:Interfaces and Protocols in Python by staticautomatic on Monday April 26, 2021 @09:10AM (#26942136)
I’d urge lots of comments if you’re using anything that might lead the reader in the direction of Twisted, which has the most impenetrable documentation of any Python library I’ve ever seen.
Re:Interfaces and Protocols in Python by ivirshup on Wednesday April 28, 2021 @01:34AM (#26965969)
The O'Reilly book cover for Twisted is a tangled ball of snakes. This seemed like an accurate choice from its reputation.